<div class="codetitle"> <span><a style="CURSOR: pointer" data="36257" class="copybut" id="copybut36257" onclick="doCopy('code36257')"><u>复制代码</u></a></span> 代码如下:</div> <div class="codebody" id="code36257"> <br><link href="css/jquery.ui.base.css" rel="stylesheet" type="text/css"> <br><link href="css/jquery.ui.theme.css" rel="stylesheet" type="text/css"> <br><script src="http://maps.google.com/maps/api/js?sensor=false" type="text/javascript"></script> <br><script src="js/jquery-1.9.1.js" type="text/javascript"></script> <br><script src="js/jquery.mousewheel.js" type="text/javascript"></script> <br><script src="js/jquery.ui.core.js" type="text/javascript"></script> <br><script src="js/jquery.ui.widget.js" type="text/javascript"></script> <br><script src="js/jquery.ui.button.js" type="text/javascript"></script> <br><script src="js/jquery.ui.spinner.js" type="text/javascript"></script> <br><link href="css/demos.css" rel="stylesheet" type="text/css"> <br><script type="text/javascript"> <BR>$(function () { <BR>function latlong() { <BR>return new google.maps.LatLng($("#lat").val(), $("#lng").val()); <BR>} <BR>function position() { <BR>map.setCenter(latlong()); <BR>} <BR>$("#lat, #lng").spinner({ <BR>step: .001, <BR>change: position, <BR>stop: position <BR>}); <BR>var map = new google.maps.Map($("#map")[0], { <BR>zoom: 8, <BR>center: latlong(), <BR>mapTypeId: google.maps.MapTypeId.ROADMAP <BR>}); <BR>}); <BR></script> <br><style type="text/css"> <BR>#map { <BR>width:500px; <BR>height:500px; <BR>} <BR></style> <br> <br> <br><label for="lat">纬度</label> <br><input id="lat" name="lat" value="44.797"> <br><br> <br><label for="lng">经度</label> <br><input id="lng" name="lng" value="-93.278"> <br><div id="map"></div> <br><div class="demo-description"> <br> </div> <br> </div>