Overview:Chance, I in JavaScript directly with the HTML element ID attribute to get the element, and set the element's other property values, can correctly parse no error! So I went to consult the relevant information, but also other peers so
Javascript uses the element id and name to directly obtain the element.
This article mainly introduces the method for javascript to directly obtain elements through element id and name. It involves some techniques related to javascript to obtain
In the previous article to introduce a JavaScript jquery ajax summary, and then introduce JavaScript jquery and Ajax relationship, interested friends to study together
Simple summary:
1, JS is a front-end language.
2, Ajax is a technology, it
Difference between ID and name in HTML
A name can correspond to multiple controls at the same time, such as checkbox and radio.
The ID must be unique in the entire document.
Purpose of ID1) ID is the identity of HTML elements, mainly used in client
When I read the jQuery source code, I often think that those factors will make me unable to read the code. Which of the most critical factors is the earliest thought of as the architectural design of jQuery, when I finally found the jQuery
ID differs from name in HTMLa name can correspond to multiple controls at the same time , such as checkbox and radioAnd the ID must be the only one in the full-text filePurpose of the ID1) ID is the identity of the HTML element, mainly in the client
This article mainly introduces how to set the style of JavaScript by element ID and name. The following is a good example, if you are interested, you can test this article. This article mainly introduces how to set the style through the element ID
JavaScript uses the element ID and name to set the style. javascriptname
1. Description
(1) return the reference or node of the provided element based on its id value.
document.getElementById("tr_th")
(2) return a reference or node for a group of
Difference between ID and name in HTMLA name can correspond to multiple controls at the same time, such as checkbox and radio.The ID must be unique in the entire document.
1)Purpose of ID
(1) ID is the identity of HTML elements and is mainly
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.