javascript - html readonly attribute not removable -
I want to delete the read only feature from the following input fields:
Lt; Input id = "cno" name = "cno" type = "number" class = "form-control" read-only / & gt; & Lt; Button type = "button" id = "no-edit" class = "btn btn-warning" & gt; Edit & lt; / Button & gt;
I tried to use jQuery (1.11) to remove the attribute on the click of a button. Click
$ ("# no-edit") (function () {$ ("# cno"). RemoveProp ('readonly');});
And I also tried to use it:
$ ("# edit"). Click (function () {$ ("# cno") .removeAttr ('readonly');});
Please help! I do not understand why this is unsuccessful.
Try this:
$ ("# edit") . Click (function () {$ ("# cno") .prop ('readable', incorrect);});
Comments
Post a Comment