/*
JavaScript Unleashed, Third Edition
by Richard Wagner and R. Allen Wyke
ISBN: 067231763X
Publisher Sams CopyRight 2000
*/
<html>
<head>
<meta http-equiv="Content-Script-Type" content="text/javascript">
<title>My First JavaScript Script</title>
<script language="JavaScript">
<!--
function passCheck(){
if(prompt("Please enter your password","") == "letmein"){
window.location = "/secure.html";
}else{
window.location = "/error.html";
}
}
//-->
</script>
</head>
<body onload="passCheck()">
<noscript>
<b>
Sorry, but your browser either does not support JavaScript or your
have it turned off. For information on JavaScript supporting browsers
or how to turn it back on, please see the website of your browser's
creator.
</b>
</noscript>
</body>
</html>
|