[Solved] I would like to display text when I press a button [closed]


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

solved I would like to display text when I press a button [closed]