假设在Safari中的HTML5中,您可以将输入类型定义为“搜索”,当用户开始输入时,X按钮将显示出来,很明显,很像Safari中的Google搜索栏。在我的网站上,这适用于桌面Safari,但在Mobile Safari中不起作用。<input type =“search”>不适用于iPhone Mobile Safari
<input id="termsField" type="search" autocorrect="off" placeholder="Type something here">
//This is the code for the X button I have to use now since HTML5 doesn't work
<INPUT type="image" name="Clear" alt="Clear" src="clearX.png" height="22" width="22"
onClick="clearText(this)">
起初我还以为这是因为我对#termsField
jQuery的自动完成功能,但同样,如果它在桌面Safari浏览器的工作原理,不会是这样的。有谁知道为什么会发生这种情况? 另外,它不能在我的iPhone或XCode的iPhone模拟器中工作,所以它不是特别针对我的iPhone的问题。
在iPad上不适用于我 – Shamoon 2013-09-04 14:50:46