JavaScript DOM
JS Form Validation
It is important to validate the form submitted by the user because it can have inappropriate values. So validation is must. The JavaScript provides you…
JS innerText property
The innerText property can be used to write the dynamic text on the html document. Here, text will not be interpreted as html text but…
JS innerHTML property
The innerHTML property can be used to write the dynamic html on the html document. It is used mostly in the web pages to generate…
getElementsByTagName
The document.getElementsByTagName() method returns all the element of specified tag name. The syntax of the getElementsByTagName() method is given below: document.getElementsByTagName(“name”) Here, name is required….
getElementsByName
The document.getElementsByName() method returns all the element of specified name. The syntax of the getElementsByName() method is given below: document.getElementsByName(“name”) Here, name is required. Example…
getElementById
The document.getElementById() method returns the element of specified id. In the previous page, we have used document.form1.name.value to get the value of the input value….
Document Object
The document object represents the whole html document. When html document is loaded in the browser, it becomes a document object. It is the root…