<style> } BUTTON.button { display: block; margin-left: auto; margin-right: auto; align: centre } #myDIV { width: 100%; padding: 50px 0; text-align: center; background-color: #65a83d; margin-top:20px; } #myDIV2 { width: 100%; padding: 50px 0; text-align: center; background-color: #65a83d; margin-top:20px; } </style> <body> <br><br> <button class="button" onclick="myFunction()">Give me a clue </button> <div> <div id="myDIV" class="hidden" style="display: none;"> Look at the 5's! </div> <br><br> <button class="button" onclick="myFunction()">Show Answer </button> <div> <div id="myDIV2" class="hidden" style="display: none;"> 15! </div> <script> function myFunction() { var x = document.getElementById('myDIV'); if (x.style.display === 'none') { x.style.display = 'block'; } else { x.style.display = 'none'; } } </script> <script> function myFunction() { var x = document.getElementById('myDIV2'); if (x.style.display === 'none') { x.style.display = 'block'; } else { x.style.display = 'none'; } } </script> </body>
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)