我有以下内容:
([follow.user] + follow.user.to_a - [follow.user]).uniq
我反对:
var initAutocomplete = function (inputId) {
// Create the autocomplete object, restricting the search to geographical
// location types.
var autocomplete = new google.maps.places.Autocomplete(
/** @type {!HTMLInputElement} */(document.getElementById(inputId)),
{ types: ['geocode'] });
// When the user selects an address from the dropdown, populate the address
// fields in the form.
autocomplete.addListener('place_changed', function () { handleAddress(this) });
return autocomplete;
}
它可以工作,但是自动完成团队和Chrome团队之间出现了令人讨厌的重叠:
如果我从 <input id="address-search" placeholder="Address" class="top-search" />
和id
中删除“地址”一词,我会得到想要的,但是我希望在占位符中有地址。我尝试将各种placeholder
html属性设置为无效。如何阻止google对我的需求做出假设?