我正在尝试将元素读入表格。
我正在将元素放入文本字段。相反,我想在表格中显示..
下面是代码
function createMarker(place) {
//var placeLoc = place.geometry.location;
var request = {
reference: place.reference
};
service = new google.maps.places.PlacesService(map);
service.getDetails(request, callback);
service.getDetails(request, function(details, status) {//alert("address "+details.formatted_address);
document.getElementById('box1').value=details.formatted_address;
document.getElementById('box2').value=details.name;
document.getElementById('box3').value=details.international_phone_number;
});
}
google.maps.event.addDomListener(window, 'load', initialize);
</script>
</head>
<body>
<input type="text" id="box1" size="20"/>
<input type="text" id="box2" size="50"/>
<input type="text" id="box3" size="20"/>
<div id="map"></div>
<div id="text">
</body>
</html>