html可编辑中的密码,尽管“ continedible = false”?
我有一个具有给定值的简单输入字段,就像以下内容一样:
<input class="pw" contenteditable="false" type="password" value="1234"></input>
如您所见,我将“可满足”设置为“ false”,这意味着我不应该从浏览器中更改值。 但是,我可以更改它,我不知道为什么?
I have a simple input field with a given value just as the following:
<input class="pw" contenteditable="false" type="password" value="1234"></input>
As you can see, I set "contenteditable" to "false" meaning that I shouldn't be able to change the value from the Browser.
However, I can change it and I have no idea why?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
亲爱的,如果您想在不可编辑的输入字段中显示密码,那么您只使用读取属性。
Dear if you want to show password in non-editable input field then you shoud use read only attribute.