In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-16 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/03 Report--
This article will explain in detail the example analysis of the HTML5 general interface. The editor thinks it is very practical, so I share it with you as a reference. I hope you can get something after reading this article.
1. Let's start with a few basic types: DOMString, boolean, long, unsigned long, double
NaN (Not-a-Number).
DOMString is actually the string in other commonly used languages. In HTML5, it is used to represent url,Dom content, and so on. Other boolean (Boolean), long (long integer), unsigned long (unsigned long integer), double (floating point number) I don't think I need to elaborate, everyone can be clear. As for NaN, I think most old JS birds also know its meaning, that is, in an infinity.
Or a non-numeric value.
Undefined and null are not introduced in the official documents. As for why, I hope there are experts to give answers.
two。 Collection types include: HTMLCollection, HTMLAllCollection
HTMLFormControlsCollection, HTMLOptionsCollection, and
HTMLPropertiesCollection .
HTMLCollection is a generic collection and the basic interface for a collection, which provides three attributes:
Length, item, namedItem.
Length is the length of the collection.
Item (index) can get the elements in the collection with index values.
NamedItem (name) can get an element using its name.
In fact, you can also use index, collection (index) or collection directly.
[name], collection (name) gets the elements in the collection.
HTMLAllCollection inherits from the HTMLCollection interface and contains the following properties:
The length and item properties are the same as those of HTMLCollection.
NamedItem (name) differs from HTMLCollection in that it is likely to return a collection.
Tags (tagname) returns a collection with tagname.
You can also directly use alternative [index], collection (index) or collection
[name], collection (name) gets the elements in the collection and returns a
HTMLAllCollection .
HTMLFormControlsCollection is a collection of form and fieldset elements. Also inherited from
HTMLCollection interface.
It has all the properties of HTMLCollection and adds an additional RadioNodeList interface. It inherits from NodeList.
In fact, RadioNodeList is by definition a collection of Radiobutton. I am curious about such a list.
The meaning in HTMLFormControlsCollection.
HTMLOptionsCollection is a collection of option that inherits from the HTMLCollection interface. It generally uses the
Manipulate the child elements of the select tag.
The unique properties of HTMLOptionsCollection are: add (option), remove (index), selectedIndex
The add method has two overloads
Void add (in HTMLElement element, in optional HTMLElement before)
Void add (in HTMLElement element, in long before)
The first parameter of an element must be added, and the following parameters are optional
Remove (index) deletes an element by index.
SelectedIndex, I'm sure everyone will understand.
This is the end of the article on "sample Analysis of HTML5 Universal Interface". I hope the above content can be helpful to you, so that you can learn more knowledge. if you think the article is good, please share it for more people to see.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.