您的位置:首页 > 其它

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

2015-12-19 22:43 337 查看
 
<!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>
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: