How can I change the value of a HTML textbox which has readonly property using jQuery?
$('input[type="text"], textarea'). attr('readonly','readonly'); 0.
$("#<%fieldname. ClientID%>"). attr("readonly","false");
In the event handler function of the remove button, we are calling the removeAttribute() method of the input element to remove readonly attribute.
$('#cf_1268591'). attr("readonly", "readonly");
Wait, did you want to remove the read only? If so:
$('textbox').removeAttr('readonly').val('Changed Value');
if not:
$('textbox').val('Changed Value');
$('my-textbox').val('new value')
The read only property only applies to the user viewing the page, not the JavaScript that accesses. it
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With