Inner HTML JavaScript Of a Button that "onClick" Changes HTML Content

PHOTO EMBED

Tue Jun 06 2023 15:06:35 GMT+0000 (Coordinated Universal Time)

Saved by @Vkmartinez95 #javascript #innerhtml #button #onclick #html

<p id="demo">JavaScript can change HTML content.</p>

<button type="button" onclick='document.getElementById("demo").innerHTML = "Hello JavaScript!">"Click Me!"</button>
content_copyCOPY

https://www.w3schools.com/Js/tryit.asp?filename=tryjs_intro_inner_html