如何禁用input的自动补全功能

有时候我们会遇到不需要input文本输入框自动补全历史输入记录,比如验证码输入框,用户登陆框等。

方法如下:

只需要在input属性中添加autocomplete="off"即可,

<input type="text" autocomplete="off">

猜你喜欢

转载自blog.csdn.net/weixin_42791849/article/details/81202021
今日推荐