I have some form which is editable in the same page. First attribute for each textbox is readonly, and when I press the edit button, it will become editable, using this syntax
$('input[readonly="readonly"]').removeAttr("readonly").prop("enabled",true);
when i press the save button, i want it become readonly again. I've trying to change it to
$('input[readonly="readonly"]').attr("readonly").prop("disable",true);
and
$('input[readonly="readonly"]').attr("readonly").prop("readonly",true);
but it won't change into readonly again.
Is there any proper way to do this?