摘要: JS 动态修改 input 的 type 属性调用: $(“#uname”);可选参数class为获取焦点时input的class,但是清除密码的时候出了一个问题,用户输入的密码应该是 ”*****”,这里需要将input 的type 属性由 text 换成 password ,如果用户没有输入密码,鼠标失去焦点的时候 type换回 text ,value 值为 “密码”。[javascript]view plaincopy$("#pswd").focus(function(){$(this).attr('type','password'); 阅读全文
posted @ 2014-02-22 22:03 雾里小梅花 阅读(416) 评论(0) 推荐(0) 编辑