我試圖改變輸入類型,特別是在點擊輸入變更後type =「text」change =「password」。使用jQuery(文本 - >密碼)更改輸入字段的類型
我不知道爲什麼,但我不能添加選項type =「密碼」作爲屬性輸入。
$('input#id_reg_pass').removeAttr("type"); #this works, type="text" is removing
$('input#id_reg_pass').attr('type', 'password'); #problem, this not works
$(this).addClass('exampleText').val($(this).attr('title'));
有沒有類似的問題?我會很高興,每一絲... 謝謝
重複的http://stackoverflow.com/questions/1544317/jquery-change-type-of-input-field – thisgeek