Javascript 活动的目的是什么;“放置搜索框”;在谷歌的地方API?
我正在使用谷歌地图JavaScript API 对于从google.maps.places.SearchBox(document.createElement('nameforeElement')返回的对象,是否存在除“places\u changed”事件以外的任何事件 您可以在本例中看到位置搜索框Javascript 活动的目的是什么;“放置搜索框”;在谷歌的地方API?,javascript,google-maps,google-places-api,Javascript,Google Maps,Google Places Api,我正在使用谷歌地图JavaScript API 对于从google.maps.places.SearchBox(document.createElement('nameforeElement')返回的对象,是否存在除“places\u changed”事件以外的任何事件 您可以在本例中看到位置搜索框 最后,我需要做的是在单击搜索框时清除它。但是我认为这个搜索框没有“点击”事件。捕捉点击事件的正确关键词是什么?”鼠标单击“,”单击“,”再次单击“…?” 将单击侦听器添加到中 对于链接示例,它将是:
最后,我需要做的是在单击搜索框时清除它。但是我认为这个搜索框没有“点击”事件。捕捉点击事件的正确关键词是什么?”鼠标单击“,”单击“,”再次单击“…?” 将单击侦听器添加到
中
对于链接示例,它将是:
// Create the search box and link it to the UI element.
var input = document.getElementById('pac-input');
var searchBox = new google.maps.places.SearchBox(input);
google.maps.event.addDomListener(input,'click',function(){
this.value='';
});
你是用js还是安卓系统?