Advertisement
muhidins

JavaScript

Oct 2nd, 2021
1,357
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <!DOCTYPE html>
  2. <html lang="en">
  3. <head>
  4.     <meta charset="UTF-8">
  5.     <meta http-equiv="X-UA-Compatible" content="IE=edge">
  6.     <meta name="viewport" content="width=device-width, initial-scale=1.0">
  7.     <title>Belajar Java Script</title>
  8. </head>
  9. <body>
  10.     <h1>Belajar JavaScript sederhana</h1>
  11.    
  12.     <button type="button" onclick="document.getElementById('webpro').innerHTML = Date()">Click Me</button>
  13.     <p id="webpro"></p>
  14.     <hr>
  15.     <p>Tekan Pengumuman untuk lihat isinya</p>
  16.     <button onclick="isiPengumuman()">Pengumuman</button>
  17.    
  18.     <script>
  19.         function isiPengumuman() {
  20.             alert("Pengumuman Penting untuk peserta didik kelas Programming Web");
  21.         }
  22.     </script>
  23. </body>
  24. </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement