Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to change keyboard button "Return" to "Search" for input in a UIWebView?

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.

enter image description here

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

enter image description here

like image 206
marsant Avatar asked Feb 14 '23 12:02

marsant


1 Answers

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>

And now the keyboard looks like

enter image description here

like image 68
marsant Avatar answered Feb 17 '23 03:02

marsant