浏览:1602008-05-16 16:40   来自红尘中迷茫      :

$(document).ready(function() {
$("#UserPass").attr("type","password");
 alert($("#UserPass").attr("type"));
});  

<input class="tbx" type="text" id="UserPass"/>

 

楼主
  2个月前   nfa2dfa      :
input 一旦加载到dom里以后,就不可以修改type了。
回复  1楼 回到顶楼 
  2个月前   红尘中迷茫      :
总算有人回复了,我也看了firefox的debug信息,看来真的没有办法了。一直以为.attr这个是万能的。。。
回复  2楼 回到顶楼 

你还不是小组成员,加入小组以后才能发布新主题!
1 345