Home  >  Article  >  Web Front-end  >  Some details of document.getElementById_javascript skills

Some details of document.getElementById_javascript skills

WBOY
WBOYOriginal
2016-05-16 19:26:131172browse

① document.getElementById sometimes grabs the name but misses the id. It is said to be a BUG of IE;
http://community.csdn.net/Expert/topic/4223/4223888.xml?temp=.1947443

The page contains

program code


[Ctrl A Select all Note: If you need to introduce external Js, you need to refresh to execute

]


② in javascript The use of getElementbyId
The elements in the web page must have an id attribute before they can be obtained through this method, such as


③ There are two main ways to obtain html tags, one is through the ID value, and the other is through the name attribute
The name attribute is mainly used for the input tag in the form
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
Previous article:Understand JavaScript classes from shallow to deep_javascript skillsNext article:Understand JavaScript classes from shallow to deep_javascript skills

Related articles

See more