Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

dom in javascript

Dom => Document object model.
//way to access html and css code through javascript.
//inside document we get all html(head,body=> h1,button,p)
document => 
document.title=> to get title of website
const header= document.getElementsByTagName('h2')
console.log(header) // get HTMLCOLLECTION of all h2 element
Source by developer.mozilla.org #
 
PREVIOUS NEXT
Tagged: #dom #javascript
ADD COMMENT
Topic
Name
2+7 =