问题
Is there a way to change the default text: "Enter a location" to 'Enter a Business Name' in Google Maps API Places Autocomplete?
回答1:
You change the placeholder attribute on the input element.
<input id="search" type="text" placeholder="Enter a Business Name" />
回答2:
In the input field itself, add a value attribute as in:
<input id="searchTextField" type="text" size="50" value="foo">
来源:https://stackoverflow.com/questions/9108499/how-do-i-change-the-default-text-in-google-maps-api-places-autocomplete