Glossary Term
DocumentFragment.getElementById()
3 tags
1 category
The getElementById() method of the DocumentFragment returns an Element object representing the element whose id property matches the specified string. Since element IDs are required to be unique if specified, they’re a useful way to get access to a specific element quickly.
If you need to get access to an element which doesn’t have an ID, you can use querySelector() to find the element using any selector.
Note: IDs should be unique inside a document fragment. If two or more elements in a document fragment have the same ID, this method returns the first element found.
Term Connections
Explore related terms connected by shared tags, shared categories, and relationship phrases. This map loads only when it comes into view.
Loading term connections…
