htmlFAR

 avatar
user_5249784
html
9 days ago
3.6 kB
1
Indexable
Never
\\confirm2.html\\
<!DOCTYPE html>
<html lang="en">
    <head>
        <title>dialog confirm</title>
    </head>
    <body>
        <script>
            var yakin = confirm("apakah kamu yakin akan meninggalkan halaman ini ?");
            if (yakin){
                document.write("ya!");
            }else{
                document.write("saya tetap di sini");
            }
        </script>
    </body>
</html>

\\index1.html
<!DOCTYPE html>
<html lang="en">
    <Head>
        <script type="text/javascript" src="program.js"></script>
    </Head>
</html>

\\index2
<!DOCTYPE html>
<html lang="en">
    <head>
        <title>dialog alert</title>
    </head>
    <body>
        <script>
            alert("hello kawan ! selamat datang di messageboc javascrip");
        </script>
    </body>
</html>

\\index3
<!DOCTYPE html>
<html lang="en">
    <head>
        <title>mengambil data dari array</title>
    </head>
    <body>
        <script>
            var products = ["pensil", "pulpen", "penghapus"];
            document.write(products[1]);
        </script>
    </body>
</html>

\\index4
<!DOCTYPE html>
<html lang="en">
    <head>
        <title>mengambil data dari array</title>
    </head>
    <body>
        <script>
            var products = ["pensil", "pulpen", "penghapus"];
            document.write("<ol>");
                for(let i=0; i<products.length; i++){
                    document.write("<li>" + products[i]+ "</li>");
                }
            document.write("</li>");
        </script>
    </body>
</html>

\\index5
<!DOCTYPE html>
<html lang="en">
    <body>
        <script language="javascript" type="text/javascrip">
            var angka ;
            while(angka != 5){
                angka = prompt("masukan sebuah angka : ");
            }
            document.write("anda telah memasukan angka 5");
        </script>
    </body>
</html>

\\index6
<!DOCTYPE html>
<html lang="en">
    <head>
        <title>nomor 6</title>
    </head>
    <body>
        <script src="scripts.js"></script>
    </body>
</html>

\\index13.htlm
<!DOCTYPE html>
<html lang="en">
    <head>
        <meta charset = "UTF-8">
        <title>Javascript</title>
    </head>
    <body>
        <script src="program13.js"></script>
    </body>
</html>

\\index14
<!DOCTYPE html>
<html lang="en">
    <head>
        <title> Nomor 14 </title>
    </head>
    <body>
        <script src = "program14.js"></script>
    </body>
</html>

\\index15
<!DOCTYPE html>
<html lang="en">
    <head>
        <title> Nomor 15 </title>
    </head>
    <body>
        <script src ="program15.js"></script>
    </body>
</html>

\\index16
<!DOCTYPE html>
<html lang="en">
    <head>
        <meta charset="UTF-8">
        <meta http-equiv="X-UA-Compatible" content="IE=edge">
        <meta name="viewport" content="width=device-width, initial-scale=1.0">
        <title> Belajar Objek Javascript </title>

        <script>
            var orang = {
                namadepan : "Ajay Alfredo",
                namabelakang : "Almani",
                tampilkannama : function(){
                    alert(`Nama :   ${this.namadepan} ${this.namabelakang}`);
                }
            };
            
            orang.tampilkannama();
        </script>

    </head>
    
</html>

\\prompt3
<!DOCTYPE html>
<html lang="en">
    <head>
        <title>dialog prompt</title>
    </head>
    <body>
        <script>
            var nama = prompt("siapa nama kamu ? ");
            document.write("<p> hello "+nama+" </p>");
        </script>
    </body>
</html>