我的脚本计算了一些值,我需要将数据传递给mongo数据库。数据位于html文件中的脚本标签之间。我有一个快递服务器在运行。有人可以帮忙吗?
autocomplete.addListener('place_changed', function() {
infowindow.close();
marker.setVisible(false);
var place = autocomplete.getPlace();
if (!place.geometry) {
// User entered the name of a Place that was not suggested and
// pressed the Enter key, or the Place Details request failed.
window.alert("No details available for input: '" + place.name + "'");
return;
}
if (place.geometry) {
// User entered the name of a Place that was not suggested and
// pressed the Enter key, or the Place Details request failed.
window.alert("Location determined:" + place.geometry.location);
console.log(place.geometry.location);
}
我发布的代码是脚本的一部分,我需要将place.geometry.location传递给我的mogodb。