Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <!DOCTYPE HTML>
- <head>
- <title>Rotate</title>
- <style>
- form
- {
- display: grid;
- grid-column-gap: 4px;
- grid-template-columns: auto auto auto;
- background-color:rgb(182, 95, 95);
- padding: 4px;
- width: 400px;
- height: 400px;
- margin-left: 40%;
- margin-top: 10%;
- }
- .button
- {
- background-color: rgba(212, 210, 68, 0.8);
- border: 1px solid rgba(0, 0, 0, 0.8);
- padding: 4px;
- font-size: 40px;
- text-align: center;
- font-weight: bold;
- cursor: pointer;
- }
- </style>
- </head>
- <body>
- <form>
- <button id="Button_1" class="button">1</button>
- <button id="Button_2" class="button">2</button>
- <button id="Button_3" class="button">3</button>
- <button id="Button_4" class="button">4</button>
- <button id="Button_5" class="button">5</button>
- <button id="Button_6" class="button">6</button>
- <button id="Button_7" class="button">7</button>
- <button id="Button_8" class="button">8</button>
- <button id="Button_9" class="button">9</button>
- </form>
- </body>
- <script>
- Button_5.onclick = function()
- {
- var viarableNum=Button_1.innerHTML;
- Button_1.innerHTML=Button_4.innerHTML;
- Button_4.innerHTML=Button_7.innerHTML;
- Button_7.innerHTML=Button_8.innerHTML;
- Button_8.innerHTML=Button_9.innerHTML;
- Button_9.innerHTML=Button_6.innerHTML;
- Button_6.innerHTML=Button_3.innerHTML;
- Button_3.innerHTML=Button_2.innerHTML;
- Button_2.innerHTML=viarableNum;
- }
- </script>
- </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement