Run Code  | Code Wall  | Users  | Misc  | Feedback  | About  | Login  | Theme  | Privacy 

HTML5 Button

      
            
                
            
 run  | edit  | history  | help 2

¿Español?

  by  DmilkaSTD, 2 months ago


<!DOCTYPE html> <html> <style> body{ color:white; font-family:arial; text-align:center; }

    p{
        color:gray;
        text-align:left;
    }

#btn{ background-color: #4CAF50; border: none; color: white; padding: 15px 32px; text-align: center; text-decoration: none; display: inline-block; font-size: 16px; margin: 4px 2px; cursor: pointer; }

    </style>

<body>

<h1 style="text-align:center">Button test</h1>

Testing button things :V

Click the button to give it a try!

<button id="btn" onclick="disappear()">Click me</button>

<h3 id="demo"; style="color:blue">

<script> var clickme = true; function disappear() { if (clickme){ clickme = false; document.getElementById("demo").innerHTML = "It works! Click the button again to remove this text."; }else{ document.getElementById("demo").innerHTML = ""; clickme = true; } } </script>

</body> </html>

  by  morgas, 1 months ago




Please log in to post a comment.