I have used "readonly" attribute to the textbox which makes the textbox non editable and may i know how to disable the readonly attribute on clicking the button. c
You can do two things:
false
HTML:
JS (option 1): [Demo]
document.getElementById('myButton').onclick = function() {
document.getElementById('myInput').removeAttribute('readonly');
};
JS (option 2): [Demo]
document.getElementById('myButton').onclick = function() {
document.getElementById('myInput').readOnly = false;
};