如何更改键盘按钮的“返回"以“搜索"在UIWebView中输入? [英] How to change keyboard button "Return" to "Search" for input in a UIWebView?

查看:220
本文介绍了如何更改键盘按钮的“返回"以“搜索"在UIWebView中输入?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个要在UIWebView中显示的简单HTML文件.

I have this simple HTML file that is to be displayed in a UIWebView.

<html>
<body>
  <p>
  <input name='search' type='search' placeholder="Input type is search" />
</body>
</html>

这是我单击输入框时的屏幕截图.

Here is the screenshot when I clicked the input box.

如何像Google页面一样将返回"按钮更改为搜索"?

How to change the Return button to 'Search' like Google page does?

推荐答案

我找到了一个简单的解决方案.只需将输入内容与表单标签一起包装,即可使HTML看起来像这样.

I found a simple solution. Just wrap the input with form tag so the HTML looks like this.

<html>
<body>
  <p>
  <form>
    <input name='search' type='search' placeholder="Input type is search" />
  </form>
</body>
</html>

现在键盘看起来像

这篇关于如何更改键盘按钮的“返回"以“搜索"在UIWebView中输入?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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