欧美bbbwbbbw肥妇,免费乱码人妻系列日韩,一级黄片

jquery 實現(xiàn)密碼框的顯示與隱藏示例代碼

 更新時間:2013年09月18日 17:39:38   作者:  
密碼框的顯示隱藏有多種實現(xiàn)方法,在將為大家介紹下如何使用jquery實現(xiàn),感興趣的朋友可以參考下

復制代碼 代碼如下:

<html>
<head>
<script type="text/javascript" src="jquery-1.5.1.min.js"></script>
<script type="text/javascript">
$(function(){
$("#chk").bind({
click: function(){
if($(this).attr("checked")){
$("#passwd2").val($("#passwd").val());
$("#passwd").hide();
$("#passwd2").show();
}else{
$("#passwd").val($("#passwd2").val());
$("#passwd2").hide();
$("#passwd").show();
}
}
});
});
</script>
</head>
<body>
<form name="formName">
<input id="passwd" type="password"
size="24" maxlength="17"
style="ime-mode: disabled; display: inline;"/>
<input id="passwd2" type="text"
size="24" maxlength="17"
style="ime-mode: disabled; display: none;" />
<input id="chk" type="checkbox" />顯示密碼
</form>
</body>
</html>

相關文章

最新評論