方法1
$(function(){
$('#forms input').attr("readonly","readonly");//让from表单下所有的input输入框都是只读状态(#setaccount是方法2里面from表单的id)
$('#forms input').click(function(){//当某个被input框点击的时候,就删掉被点击的这个input框的只读属性readonly
$(this).removeAttr("readonly");
});
});
方法2
用了autocomplete=new-password,密码不会自动填充了,但还是会弹出来让选择自动填充。尤其还会自动填充密码栏以及接近的type=text的input框。这不符合需求
还有一些电话号码 也会填充隔壁type=text的input框
使用elementUI-input也会偶然出现这个
<el-input v-model.trim="formData.password" auto-complete="new-password" type="password" show-password maxlength="50" :placeholder="输入" />
方法3
在方法2的基础上,套一层el-form。隔绝弹框与页面影响