今天遇到了一个奇葩问题,写HTML时有个select控件。通过设置option的selected="selected"竟然无效,可是在其它浏览器是能够的。问了一下Google大神,说要在select标签加上autocomplete="off",如:

<select autocomplete="off">

    <option>是</option>

    <option selected="selected">否</option>

</select>


这样就OK了!以后要养成个好习惯,每一个select标签都加上 autocomplete="off" 就万无一失了

相关文章:

  • 2022-12-23
  • 2022-01-03
  • 2021-06-28
  • 2021-06-25
  • 2021-07-26
  • 2021-08-09
  • 2021-12-05
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2022-01-17
  • 2021-09-23
  • 2022-12-23
  • 2022-12-23
  • 2022-02-02
相关资源
相似解决方案