如何在没有表单标签的情况下更改 Mobile Safari 键盘中的返回键文本?
当我的输入元素获得焦点时,我想更改 Mobile Safari 键盘上的“返回”按钮文本。我知道你可以这样做:
<form action="somewebsite.com">
<input id='SearchTextBox' type="search"/>
<input id='SearchButton' type="button" value="Search" />
</form>
但我不想要表单标签,因为搜索是ajaxian(我不想重新加载页面)。
有谁知道这是否可能?
I would like to change the the "return" button text on the Mobile Safari keyboard when my input element is focused. I know you can do this:
<form action="somewebsite.com">
<input id='SearchTextBox' type="search"/>
<input id='SearchButton' type="button" value="Search" />
</form>
But I don't want the form tag because the search is ajaxian (I don't want to reload the page).
Does anyone know if this is possible?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
呵呵,应该想到这一点(同事解决了)。只需使用 JavaScript 取消表单提交即可。例如:
Heh, should have thought of this (coworker solved). Just cancel the form submission with JavaScript. For example:
您现在可以使用
enterkeyhint
还有更多选项,例如“发送”、“执行”等
You can now use
enterkeyhint
Theres more options like "send", "go", etc