在IOS中,将Input 的type设置为search 后键盘回车键上的文字是换行,需求是回车键文字是”搜索“。
解决办法:
给input外套一个form,并且加个空的”action“.
<form action="">
<input type="search"/>
</form>
本文介绍在iOS设备上,如何通过包裹input元素的form标签并设置空的action属性,解决搜索框回车键显示为换行而非搜索的问题。
在IOS中,将Input 的type设置为search 后键盘回车键上的文字是换行,需求是回车键文字是”搜索“。
解决办法:
给input外套一个form,并且加个空的”action“.
<form action="">
<input type="search"/>
</form>
转载于:https://www.cnblogs.com/Mxy-cnblog/p/10113582.html

被折叠的 条评论
为什么被折叠?