Advertisement
Guest User

Untitled

a guest
Jun 18th, 2019
65
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.08 KB | None | 0 0
  1. <!DOCTYPE HTML>
  2. <head>
  3. <title>Rotate</title>
  4.  
  5. <style>
  6. form
  7. {
  8. display: grid;
  9. grid-column-gap: 4px;
  10. grid-template-columns: auto auto auto;
  11. background-color:rgb(182, 95, 95);
  12. padding: 4px;
  13. width: 400px;
  14. height: 400px;
  15. margin-left: 40%;
  16. margin-top: 10%;
  17. }
  18. .button
  19. {
  20. background-color: rgba(212, 210, 68, 0.8);
  21. border: 1px solid rgba(0, 0, 0, 0.8);
  22. padding: 4px;
  23. font-size: 40px;
  24. text-align: center;
  25. font-weight: bold;
  26. cursor: pointer;
  27. }
  28.  
  29. </style>
  30. </head>
  31.  
  32. <body>
  33.  
  34.  
  35. <form>
  36. <button id="Button_1" class="button">1</button>
  37. <button id="Button_2" class="button">2</button>
  38. <button id="Button_3" class="button">3</button>
  39. <button id="Button_4" class="button">4</button>
  40. <button id="Button_5" class="button">5</button>
  41. <button id="Button_6" class="button">6</button>
  42. <button id="Button_7" class="button">7</button>
  43. <button id="Button_8" class="button">8</button>
  44. <button id="Button_9" class="button">9</button>
  45. </form>
  46. </body>
  47. <script>
  48. Button_5.onclick = function()
  49. {
  50. var viarableNum=Button_1.innerHTML;
  51. Button_1.innerHTML=Button_4.innerHTML;
  52. Button_4.innerHTML=Button_7.innerHTML;
  53. Button_7.innerHTML=Button_8.innerHTML;
  54. Button_8.innerHTML=Button_9.innerHTML;
  55. Button_9.innerHTML=Button_6.innerHTML;
  56. Button_6.innerHTML=Button_3.innerHTML;
  57. Button_3.innerHTML=Button_2.innerHTML;
  58. Button_2.innerHTML=viarableNum;
  59. }
  60.  
  61.  
  62. </script>
  63.  
  64. </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement