在iPhone / iPad Safari键盘上显示“搜索”按钮 [英] Show 'Search' button in iPhone/iPad Safari keyboard
问题描述
我注意到在戴尔或谷歌等网站上进行导航,在iPhone上输入他们的搜索文本框,在键盘上出现一个蓝色按钮搜索,而不是标准的开始按钮,出现在任何标准格式中。
您应该如何显示搜索按钮? 您可以通过以下方式影响此行为:
< input type =search/>
忽略提交
按钮的文字为'水壶',我只是想以确保它不是影响iOS键盘文本的提交按钮......
这当然是向后兼容的,因为浏览器不支持理解 type =search
会默认为 type =text
,这对创建向前规划HTML5表单。
I've noticed navigating in websites like Dell or Google, that typing in their search text box with iPhone, in the keyboard appears a blue button 'Search' instead of the standard 'Go' button that appears on any normal form.
What should you do to display the search button?
You can influence this behaviour with:
<input type="search" />
Ignore the submit
button's text being 'kettle,' I just wanted to be sure that it wasn't the submit button influencing the text of the iOS keyboard...
This is, of course, backwards compatible since a browser that doesn't understand type="search"
will default to type="text"
, which is useful for creating forward-planning html5 forms.
这篇关于在iPhone / iPad Safari键盘上显示“搜索”按钮的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!