[Solved] I would like to display text when I press a button [closed]
[ad_1] this is a code based on what I understood from your question <!DOCTYPE html> <html> <body> <button id=”demo” onclick=”myFunction()”>Click me.</button> <script> function myFunction() { document.getElementById(“demo”).innerHTML = “thank you!”; } </script> </body> </html> 0 [ad_2] solved I would like to display text when I press a button [closed]