Last active
December 5, 2022 19:17
-
-
Save shaileshkjha/4602270 to your computer and use it in GitHub Desktop.
log in page for online book store
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<html> | |
<head> | |
<title> | |
Login page | |
</title> | |
</head> | |
<body> | |
<h1 style="font-family:Comic Sans Ms;text-align="center";font-size:20pt; | |
color:#00FF00;> | |
<MARQUEE>WWW.BOOKS.COM</MARQUEE> | |
</h1> | |
<form name="login"> | |
Username<input type="text" name="userid"/> | |
Password<input type="password" name="pswrd"/> | |
<input type="button" onclick="check(this.form)" value="Login"/> | |
<input type="reset" value="Cancel"/> | |
</form> | |
<script language="javascript"> | |
function check(form)/*function to check userid & password*/ | |
{ | |
/*the following code checkes whether the entered userid and password are matching*/ | |
if(form.userid.value == "myuserid" && form.pswrd.value == "mypswrd") | |
{ | |
window.open('target.html')/*opens the target page while Id & password matches*/ | |
} | |
else | |
{ | |
alert("Error Password or Username")/*displays error message*/ | |
} | |
} | |
</script> | |
</body> | |
</html> | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment