js正则实现的密码框简单制作,还可以替换成自己想用得符号
人气:0
密码框简单制作,还可以替换成自己想用得符号.
<style type="text/css">
#c { position: relative; }
#a { position: absolute; left: 0; top: 0; font-size: 12px; font-family: 宋体; }
#b { position: absolute; left: 0; top: 0; font-size: 12px; font-family: 宋体; -moz-opacity:0;opacity: 0;filter: alpha(opacity=0); }
</style>
<body>
<div id="c">
<input id="a" />
<input id="b" onkeyup="document.getElementById('a').value=this.value.replace(/./g,'*');" />
</div>
[Ctrl+A 全选 注:如需引入外部Js需刷新才能执行]
<style type="text/css">
#c { position: relative; }
#a { position: absolute; left: 0; top: 0; font-size: 12px; font-family: 宋体; }
#b { position: absolute; left: 0; top: 0; font-size: 12px; font-family: 宋体; -moz-opacity:0;opacity: 0;filter: alpha(opacity=0); }
</style>
<body>
<div id="c">
<input id="a" />
<input id="b" onkeyup="document.getElementById('a').value=this.value.replace(/./g,'*');" />
</div>
[Ctrl+A 全选 注:如需引入外部Js需刷新才能执行]
加载全部内容