How does JavaScript get the specified object on the current page. The
method is as follows:
document.getElementById(ID) //Get the object with the specified ID value
document.getElementsByName(Name) //Get the object array with the specified Name value
document.all[] //very Smart stuff is just non-WEB standard
document.getElementsByTagName //Get the object array of the specified tag value
The example is given below. Just remove the comments and run it directly to see the effect.
Statement: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