1
我的數據庫記錄打印到輸入值中的表格中。對於每一條記錄,我都需要位置字段由Google自動完成他們的API。無限Google地方實例
HTML:
<input name="edit_airplane[1][location]" type="text" class="airplane_location" value="Balmaceda">
的Javascript:
function initAutocomplete() {
var airplane_location_field = jQuery('.airplane_location');
autocomplete = new google.maps.places.Autocomplete(airplane_location_field), {types : ['geocode']});
autocomplete.addListener('place_changed', function() {
/*
Whenever the value of the location field has changed. I need to
Create a new input field which is hidden with the full address
Of the selected google autocomplete location.
*/
});
}
什麼是檢查其輸入字段已經改變的最佳途徑?