如何更改Google Maps API Places自动填充中的默认文字 [英] How do i change the default text in Google Maps API Places Autocomplete

查看:115
本文介绍了如何更改Google Maps API Places自动填充中的默认文字的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否有方法可以在输入位置到输入商户名称 maps / documentation / javascript / examples / places-autocomplete.htmlrel =nofollow> Google Maps API放置自动完成功能

Is there a way to change the default text: "Enter a location" to 'Enter a Business Name' in Google Maps API Places Autocomplete?

推荐答案

您更改输入元素上的占位符属性。

You change the placeholder attribute on the input element.

<input id="search" type="text" placeholder="Enter a Business Name" />

这篇关于如何更改Google Maps API Places自动填充中的默认文字的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆