Home > Web Front-end > JS Tutorial > A brief analysis of the readonly and enabled attributes of js setting controls_javascript skills

A brief analysis of the readonly and enabled attributes of js setting controls_javascript skills

WBOY
Release: 2016-05-16 17:07:12
Original
1170 people have browsed it

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

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template