SHARE
TWEET

Untitled

Rofihimam Sep 3rd, 2019 83 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4.     <title>IF+ ELSE IF + ELSE Rofi'ul Himam XI RPL 2</title>
  5.     <link rel="stylesheet" type="text/css" href="BuatIf.css">
  6. </head>
  7. <body>
  8.     <p>Penggunaan <b>ELSE IF</b> bertujuan untuk mengganti <b>IF</b> dalam jumlah banyak</p>
  9.     <p id="demo">
  10.         <script>
  11.             var d = new Date()
  12.             var time = d.getHours()
  13.                 if (time < 9) {
  14.                     document.write("Selamat Pagi!");
  15.                 }
  16.                 else if (time >= 12 && time < 15){
  17.                     document.write("Hari yang panas");
  18.                 }
  19.                 else {
  20.                     document.write("Hello World!");
  21.                 }
  22.         </script>
  23.     </p>
  24. </body>
  25. </html>
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top