document.queryselector('tasyntax');
document.querySelector('.class') //for Class Selector
document.querySelector(''#id')
== //for id selector
document.getElementById(''.className')
| property | Description |
|---|---|
| Active Element | Returns the current focused element in the document |
| addEventListener() | Attaches an event handler to the document |
| Body | Sets or returns the document's body (body element> |
| Cookie | Returns all name/value pairs of cookies in the document |
| createElement() | Creates an Element node |
| documentElement | Returns the document element of the html element |
| getElementById(), getElementByClassName(), getElementsByName(), getElementsByTagName() |
Returns element(s) by name/class/tag/id |
| querySelector() | Returns the first element that matches a specified CSS selector |
| querySelectorAll() | Returns all the elements that matche a specified CSS selector |
| Title | Sets or returns the title of the document |
back to main page