Rofihimam

Untitled

Sep 9th, 2019
137
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4.     <title>Buat Fungsi 4 Rofi'ul Himam XI RPL 2</title>
  5.     <link rel="stylesheet" type="text/css" href="perulangan.css">
  6.     <link href="https://fonts.googleapis.com/css?family=Merienda+One&display=swap" rel="stylesheet">
  7. </head>
  8. <body>
  9.     <p id="coba">
  10.         <script type="text/javascript" language="javascript">
  11.             var nama = "SMK Negeri 4 Bandung";
  12.             var dimanaKata = nama.indexOf("Bandung"); //dimana kata akan bernilai 13
  13.             document.write("Dari fungsi ini, Bandung ada di urutan ke " + dimanaKata + " dari kalimat SMK Negeri 4 Bandung");
  14.         </script>
  15.     </p>
  16. </body>
  17. </html>
RAW Paste Data