在IOS(ipad iPhone等)系统的浏览器里打开H5页面。如下写法:

<input type="search" name="search” >

 以上设备的键盘仍然显示“换行”。

解决方法如下:在input外面嵌套一层form:

<form action="">
    <input type="search" name="search" >
</form>

 

其中form 必须有action

如果你不想要action,因为它可能影响了你input的提交逻辑,可以重写一下onsubmit onclick等方法来实现。

也可以用简单的方法:action="javascript:return true;"。

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2021-12-03
  • 2022-12-23
  • 2022-12-23
  • 2021-07-26
  • 2022-12-23
猜你喜欢
  • 2022-03-09
  • 2021-09-23
  • 2022-12-23
  • 2021-10-22
  • 2022-12-23
  • 2021-09-07
  • 2022-12-23
相关资源
相似解决方案