HTML control_html/css_WEB-ITnose

WBOY
Release: 2016-06-24 11:49:49
Original
1224 people have browsed it

HTML controls can be divided into HTML input controls and HTML container controls according to their use in forms. In addition to having a large number of the same public properties, each HTML control also has its own unique properties, so these properties can be divided into There are three categories: properties shared by HTML controls, properties shared by HTML input controls, and properties shared by HTML container controls
1. Properties shared by HTML controls
All controls in HTML have Attributes, Disabled, Style, TagName, Visible and other attributes.
Attributes attribute, used to obtain the collection of name and value pairs representing all attributes (Attribute) on the server control tag in the selected ASP.NET page. Use this property to programmatically access the properties of an HTML server control. All HTML server controls store their properties in Control.ViewState.
Disabled attribute, used to get or set a value that indicates whether the HTML server control is disabled. Syntax:

True if the control is disabled, false otherwise, and the default value is false.
Style property, obtains the collection of all cascading style sheet CSS properties applied to the HTML server control specified in the ASP.NET file
TagName property, obtains the element name of the tag containing the runat="server" attribute
Visible property, gets or sets a value that indicates whether the HTML server control is displayed on the page.
2. Properties shared by HTML input controls
In addition to the properties shared by all HTML controls, HTML input controls also have the following properties
Name property, used to get or set the unique identifier name of the HtmlInputControl control
Value property, used to get or set the value associated with the HtmlInputControl control. Syntax:

Type attribute defines the rendering type or acquisition of the HtmlInputControl control on the web page or its type. For example, if the value of this property is Text, the HtmlInputControl control is a text box.
3. Properties shared by HTML container controls
HTML container controls are mapped to HTML elements. These elements must have start and end tags, such as , , etc. Its unique attributes mainly include two Type:
InnerHtml attribute, used to get or set the content located between the opening tag and the closing tag of the specified HTML server control. It automatically encodes special characters in and out of HTML entities. HTML entities allow the display of special characters, which browsers typically interpret as having special meanings. The "<" character is interpreted as the beginning of a flag and will not be displayed on the page. To display "<" you need to use the entity <. Syntax:

InnerText property, used to get or set the text between the start tag and the end tag of the HTML server control. Different from the InnerHtml property, the InnerText property Special characters that automatically go in and out of HTML entities are not encoded. So it is usually used when the text does not need to display special characters.
Syntax:

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