Home >Web Front-end >JS Tutorial >A brief analysis of the readonly and enabled attributes of js setting controls_javascript skills
How to set the readonly and enabled attributes of the control using js?
I tried setting it like this but it didn’t work. Text1 is
text1. readonly=true;
and
text1.enabled=true;
neither work, why???
Answer:
disabled=flase; //lowercase
readOnly=true; //uppercase