<html>
<head>
<title>JavaScript Alert Boxes</title>
<script language="JavaScript">
function box(whichText,color)
{document.bgColor=color;
alert(whichText);
document.bgColor="white";}
</script>
</head>
<body>
<a href="#" onClick="box('You just opened box #1','red')">Box #1</a><br>
<a href="#" onClick="box('This is box #2','green')">Box #2</a>
</body>
</html>
No comments:
Post a Comment