Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <html>
- <head>
- <style>
- #home {
- display: block;
- }
- #one {
- display: none;
- }
- </style>
- </head>
- <body>
- <section id="home">
- <button onclick="show('one')">Click</button>
- </section>
- <section id="one">
- <button onclick="show('home')">Back</button>
- </section>
- <script>
- function show(id) {
- document.getElementById('home').style.display = "none";
- document.getElementById('one').style.display = "none";
- document.getElementById(id).style.display = "block";
- }
- </script>
- </body>
- </html>
Advertisement
Add Comment
Please, Sign In to add comment