1、使用contenteditable=“true”,使任何标签都可以获取用户输入。
<div contenteditable="true"></div>
再react中使用时会出错,添加属性
suppressContentEditableWarning={ true }
2、使用autocomplete=“off”,禁止浏览器再用户输入的时候展示以前的输入内容。
使用过程中可能遇到off无法生效的情况,可以设置为new-password。
1、使用contenteditable=“true”,使任何标签都可以获取用户输入。
<div contenteditable="true"></div>
再react中使用时会出错,添加属性
suppressContentEditableWarning={ true }
2、使用autocomplete=“off”,禁止浏览器再用户输入的时候展示以前的输入内容。
使用过程中可能遇到off无法生效的情况,可以设置为new-password。