日期:2014-05-17 浏览次数:20536 次
Page.RegisterStartupScript("ggg", "<script>getAddress(" + "23"+ "," + "13"+ ");</script>");
function getAddress(ptlat,ptlon)
{
var latlng= new GLatLng(ptlat,ptlon);
var geocoder = new GClientGeocoder();
geocoder.getLocations(latlng,showAddress);
} function showAddress(response)
{
var point = new GLatLng(place.Point.coordinates[1],place.Point.coordinates[0]);
var address=place.address;
}
//先判断空否
string[] point = hfLatLng.Value.Split('
------解决方案--------------------
');
Page.RegisterStartupScript("ggg", "<script>getAddress(" + point[0] + "," + point[1] + ");</script>");
<script type="text/javascript" >
var name = "jacky";
function getName(name) {
document.getElementById("name").value = name;
}
</script>
<input type="hidden" runat="server" id="name" />
string name = this.name.Value;