qwe

常用链接

统计

最新评论

2011年6月14日 #

改变密码框的传统样式,圆点还是星号 自己决定

<html>

<!--样式-->

<style type="text/css">
#c { position: relative;}
#a { position: absolute; left: 
10; top: 10; font-size: 12px; font-family: 宋体; }
#b { position: absolute; left: 
10; top: 10; 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>

</body>

</html>
想改变密码框输入后的显示效果,是星号还是圆点,只需将replace中的
* 改变
 

posted @ 2011-06-14 09:18 qwe 阅读(514) | 评论 (0)编辑 收藏

仅列出标题