<!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>
input text 框当密码框使用(火狐下有默认值的bug)
最新推荐文章于 2024-04-30 17:59:49 发布