What is DOM? Document Object Model
After accessing the object we can set/reset some properties (like value, innerHTML, innerText
) of that object
Here is an Example, we simply want to change the label of the button below once the button is clicked.
and call on button click event
document.getElementById("btnUpdate").value = "Yes, You have clicked";
, Below is the code.
To write anything in document use document.write(string)