rezamalik15

Counter dengan Javascript - No JS included

May 17th, 2023
1,795
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
HTML 5 1.12 KB | None | 0 0
  1. <html lang="en">
  2. <head>
  3.     <meta charset="UTF-8">
  4.     <meta name="viewport" content="width=device-width, initial-scale=1.0">
  5.     <title>Counter</title>
  6.     <style>
  7.  
  8.         .container {
  9.             margin-left: auto;
  10.             margin-right: auto;
  11.             width: 200px;
  12.             text-align: center;
  13.         }
  14.  
  15.         button{
  16.             width: 150px;
  17.             margin-bottom: 3px;
  18.             border-radius: 3px;
  19.             color: white;
  20.             margin:0;
  21.         }
  22.  
  23.         .blue {
  24.             background-color: blue;
  25.         }
  26.  
  27.         .red {
  28.             background-color: red;
  29.         }
  30.  
  31.         #number {
  32.             font-size: 100px;
  33.             width:200px;
  34.             text-align: center;
  35.             margin:auto;
  36.         }
  37.  
  38.  
  39.     </style>
  40. </head>
  41. <body>
  42.     <div class="container">
  43.        
  44.         <p id="number"></p>
  45.  
  46.         <button class="button blue" onclick= count()>COUNT</button>
  47.         <br>
  48.         <button class="button red" onclick= reset()>RESET</button>
  49.     </div>    
  50.  
  51.     <script>
  52.        // masukkan script javascript di sini
  53.     </script>
  54. </body>
  55. </html>
Advertisement
Add Comment
Please, Sign In to add comment