This code will zoom the map to its initial extent
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=7, IE=9, IE=10">
<meta name="viewport" content="initial-scale=1, maximum-scale=1,user-scalable=no" />
<title>Simple Map</title>
<link rel="stylesheet" href="http://js.arcgis.com/3.6/js/esri/css/esri.css">
<style>
html, body, #map
{
height: 100%;
width: 100%;
margin: 0;
padding: 0;
}
body
{
background-color: #FFF;
overflow: hidden;
font-family: "Trebuchet MS";
}
.my_button
{
position: absolute;
z-index: 100;
left: 10px;
bottom: 10px;
}
</style>
<script src="http://js.arcgis.com/3.6/"></script>
<script>
var map, extent;
require(["esri/map", "dojo/domReady!"], function (Map) {
map = new Map("map", {
basemap: "topo",
center: [-122.45, 37.75], // long, lat
zoom: 13,
sliderStyle: "small"
});
map.on("load", function () {
extent = map.extent;
});
});
function zoomFunction() {
map.setExtent(extent);
}
</script>
</head>
<body>
<div id="map">
<button type="button" class="my_button" onclick="zoomFunction();">Zoom to Original Extent</button>
</div>
</body>
</html>