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.
document.getElementById("btnUpdate").value = "Yes, You have clicked";
Click => , Below is the code.
To write anything in document use document.write(string)