【代码】HTML禁止input自动填充

2021-09-08 10:45:00  阅读 2544 次 评论 0 条
  1. 在form表单或者input使用autocomplete=”off”

<input type="text" name="name" autocomplete="off"/>
<form action="demo.php" method="get" autocomplete="off"></form>

2.不让页面读取缓存数据

<meta http-equiv= "Pragma" content= "no-cache" /> 
<meta http-equiv= "Cache-Control" content= "no-cache" /> 
<meta http-equiv= "Expires" content= "0" />

3.type="password"的时候禁止自动填写密码

<input type="password" name="pwd" autocomplete="new-password"/>



微信扫码查看本文
本文地址:https://www.yangguangdream.com/?id=2162
版权声明:本文为原创文章,版权归 编辑君 所有,欢迎分享本文,转载请保留出处!

发表评论


表情

还没有留言,还不快点抢沙发?