The following code to add and remove the property readonly
works (gotten from here):
$('#someid').prop('readonly', true);
$('#someid').removeProp('readonly');
But the W3C standard recommend to use the readonly attribute without a value (gotten from here):
We should use: <input type="text" readonly />
Instead: <input type="text" readonly="true or readonly or anything" />
As $('#someid').prop('readonly');
doesn't work. What is the code to do it properly?