Transform input type text to password [duplicate]

☆樱花仙子☆ 提交于 2019-12-06 07:35:50
26ph19

This will work

$('input').on('click', function () {
   $(this).attr('type', 'password'); 
});

jsfiddle

Update

For IE read accepted answer for this post.

jquery.Attr should work the way that you want:

http://jsfiddle.net/7UA95/

UPDATE

This one when you click on it:

http://jsfiddle.net/7UA95/1/

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!