Home > Web Front-end > JS Tutorial > How to set the value of readOnly in JS_javascript skills

How to set the value of readOnly in JS_javascript skills

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

In web pages, we sometimes need to control the "input status" of the text input box. Some key attributes cannot be modified. At this time, we need to set the readonly attribute of the text input box to False. In the web page, we can use

But in JS, we cannot use txt_name.readonly="readonly" to set this attribute. Since JS is case-sensitive, when calling this attribute, we must use txt_name.readOnly=true to set it. .

Of course, the web page text box also has an attribute that can control its status, disabled. This attribute also restricts users from modifying the content of the text box. However, after this attribute is set to "disabled", the C# background code cannot obtain this control. content.

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