|
contoh external script
Type in the following text:
<html>
<head>
</head>
<body>
<script src="xxx.js">
</script>
<p>
The actual script is in an external script file called "xxx.js".
</p>
</body>
</html>
|
Save the file as "mypage.htm". and
than double click on file.
-end-
Contoh tombol/button dengan gambar
Type in the following text:
<html>
<head>
<script type="text/javascript">
function mouseOver()
{
document.b1.src ="file kamu1";
}
function mouseOut()
{
document.b1.src ="file kamu2";
}
</script>
</head>
<body>
<a href="http://www.w3schools.com" target="_blank">
<img border="0" alt="Visit W3Schools!" src="b_pink.gif"
name="b1" width="26" height="26" onmouseover="mouseOver()"
onmouseout="mouseOut()" /></a>
</body>
</html>
|
Save the file as "mypage.htm". and
than double click on file.
-end-
|