Home > Web Front-end > HTML Tutorial > The difference between html ReadOnly and Enabled_HTML/Xhtml_Web page production

The difference between html ReadOnly and Enabled_HTML/Xhtml_Web page production

WBOY
Release: 2016-05-16 16:43:02
Original
1929 people have browsed it

The TextBox with the ReadOnly attribute will display like this on the client: <input readonly = "readonly">

Enabled The TextBox with the attribute will display like this on the client: <input disabled="disabled">

Html server control uses a class derived from the HtmlControl base class (full class name System.Web.UI.HtmlControls). This type of control only has the Disabled attribute.

According to W3C specifications: http: //www.w3.org/TR/REC-html40/interact/forms.html#h-17.12


The input set to disabled will have the following restrictions:

Can accept focus Will be skipped when using the tab key Inputs set to readonly that may not be successful will have the following restrictions:

Can accept focus but not Modify Use the tab key to navigate It may be successful. Only successful form elements are valid data, that is, they can be submitted. The value attributes of disabled and readonly text input boxes can only be modified through scripts.

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