Код: Выделить всё
// This example requires the Places library. Include the libraries=places
// parameter when you first load the API. For example:
//
function initMap() {
const input = document.getElementById("location-input");
const autocomplete = new google.maps.places.Autocomplete(input);
autocomplete.addListener("place_changed", () => {
const 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 + "'");
swal("Please fill all the *Required fields","Click okay to continue", "warning");
return;
}
});
}Код: Выделить всё
Document
Я пытался добавить прослушиватель событий отправки, но не смог получить то, что ожидал
Подробнее здесь: https://stackoverflow.com/questions/656 ... script-api
Мобильная версия