将输入类型设置为密码可以获得您想要的行为,但是您必须恢复并显示文本。下面的测试页面越来越接近,但仍然需要一些爱。隐藏点会使光标消失。祝你好运。问题显然是三星忽略了实现属性,所以你可以原谅忽略这一点,我觉得。
<!DOCTYPE html>
<html lang="en" xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta charset="utf-8" />
<title></title>
<style>
input[type="password"] {
cursor : url(cursor.png),auto;
color : rgba(0,0,0,0);
}
</style>
</head>
<body>
<form>
<input type="password" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false" id="under" /><br />
<div id="over" style="position:absolute; left:10px; top:10px"></div>
</form>
<script>
function textChanged(event) {
document.getElementById('over').innerHTML = document.getElementById('under').value;
}
document.getElementById('under').addEventListener('keyup', textChanged);
</script>
</body>
</html>