Home > Web Front-end > JS Tutorial > JavaScript gets the code of an element on the page_javascript tips

JavaScript gets the code of an element on the page_javascript tips

WBOY
Release: 2016-05-16 18:09:27
Original
1112 people have browsed it

The syntax recommended by W3C standards is to obtain an element in the DOM tree through the document document object. Common methods include getElementById(), getElementsByName(), and getElementsByTagName(). Their functions are through the id attribute and name attribute/tag name respectively. Returns a single node or collection of nodes.

Copy code The code is as follows:

.org/1999/xhtml">


JavaScript method of getting an element on the page
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template