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);
精彩评论