In the Web standard, you can use getelementbyid (), getelementsbyname (), and getelementsbytagname () to access any tag in the document.
(1) getelementbyid ():
Getelementbyid () can access a specific element in the document. As the name suggests,
In the Web standard, you can use getelementbyid (), getelementsbyname (), and getelementsbytagname () to access any tag in the document.
(1) getelementbyid ():
Getelementbyid () can access a specific element in the document. As the name suggests,
Web standards can access any of the tags in the document through getElementById (), Getelementsbyname (), and getElementsByTagName ().(1) getElementById ():getElementById () can access a specific element in the document, as the name implies, by
Any one of the labels in document:
1, getElementById ()
getElementById () can access a specific element in the document, as the name implies, by using an ID to get the element, so you can only access the element that has the ID set.
For example,
In js writing, you often need to obtain the id object. If you use getElementById directly to obtain the object, there are many codes and the old browser does not support this attribute. You can consider using the following code. For example, use _ $
JS getElementById Example Tutorial
In doing Web page is getElementById will often use one, it can get a specific ID window content or change the contents of the container below let's take a look at the getElementById instance.
Add or delete
Getelementbyid getelementsbyname getelementsbytagname difference and summary
1st Floor
Getelementbyid getelementsbyname getelementsbytagname difference and summaryIn the Web standard, you can use getelementbyid (), getelementsbyname (),
From lcx's blog
In the WEB standard, you can use getElementById (), getElementsByName (), and getElementsByTagName () to access any tag in the DOCUMENT:
1. getElementById ()GetElementById () can access a specific element in the DOCUMENT. As the name
Getelementbyid () getelementsbyname () getelementsbytagname ()
DifferenceIn the Web standard, you can use getelementbyid (), getelementsbyname (), and getelementsbytagname () to access any tag in javasnent:
1 getelementbyid ("ID ")Getelementbyid ()
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.