input text 框当密码框使用(火狐下有默认值的bug)

来源:互联网 发布:dnf端口辅助黄金点 编辑:程序博客网 时间:2024/05/17 03:52
 
<!doctype html><html lang="en"><head><meta charset="UTF-8" /><script type="text/javascript" src="js/jquery-2.2.4.min.js"></script><title>Document</title><script type="text/javascript">$(function() {$('button').mousedown(function() {$("input").attr('type', 'text');});$('button').mouseup(function() {$("input").attr('type', 'password');})})</script></head><body><input type="password" /><button>click</button></body></html>

0 0
原创粉丝点击