开发者

How to set uneditable input text box to editable using jquery?

I'm using firebug and in a page there is one text field:

 <INPUT TYPE="PASSWORD" NAME="CorporateSignonPassword" size="20" maxlength="28" >

and this field is disabled. Actually I've forgotten password in my banking login account and it is forcing me to type in my long passwords using 开发者_C百科visual keybord buttons.

Why isn't this working?:

$("input").attr("editable",true); 

or

  $("input").attr("disabled",false); 

I've jquerified the page.


If you're using >= jQuery 1.6 then you should be using the prop() method rather than attr() in this particular instance:

$("input").prop("disabled", true);

or

$("input").prop("disabled", false);


How about removing the "readonly" attribute? I think input tag has an attribute called "readonly".


Try this:

$("input[type='password']").attr('disabled', false);
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜