Jumat, 20 April 2012
Event Objek Image [ Aplikasi IT Part II ] pertemuan ke-6.4
<html>
<head>
<title> Event onFocus </title>
</head>
<body>
<script languange = "javaScript">
<!--
function warna(pilihan)
{
alert("Warna background akan berubah menjadi Warna " + pilihan);
document.bgColor = pilihan;
}
</script>
<center>
<h3> Contoh Event onFocus </h3>
<hr width="500" color = "blue">
<p> Pilih warna background </p>
<form>
<input type = "button" value = "Biru muda" onFocus = "warna('lightblue')">
<input type = "button" value = "Pink" onFocus = "warna('pink')">
<input type = "button" value = "Coklat" onFocus = "warna('burlywood')">
<input type = "button" value = "Ungu" onFocus = "warna('purple')">
<input type = "button" value = "Coklat" onFocus = "warna('chocolate')">
<input type = "button" value = "Hitam" onFocus = "warna('black')">
</form>
</center>
<hr width = "500" color = "blue">
</body>
</html>
Langganan:
Posting Komentar (Atom)
Tidak ada komentar:
Posting Komentar