Here is some JavaScript code that demonstrates how to use JavaScript to change HTML text on a page by clicking a button. When the button is clicked, the text is replaced with a random quote. Reset Demo This example uses DOM elements innerHTML and document.getElementById(). It also uses a couple of Math functions such as … Continue reading JavaScript: Demo of getElementById( )