0% found this document useful (0 votes)
54 views1 page

Up

This document contains an HTML login page with a form to enter a username and password. A JavaScript function checks if the entered username and password match predefined credentials, and opens a target page if so or displays an error message if not. The login page has a centered heading in green Comic Sans font, and buttons to submit or reset the form.
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
54 views1 page

Up

This document contains an HTML login page with a form to enter a username and password. A JavaScript function checks if the entered username and password match predefined credentials, and opens a target page if so or displays an error message if not. The login page has a centered heading in green Comic Sans font, and buttons to submit or reset the form.
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
You are on page 1/ 1

<html> <head> <title> Login page </title> </head> <body> <h1 style="font-family:Comic Sans Ms;text-align="center";font-size:20pt; color:#00FF00;> Simple Login

Page </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 matchin g*/ 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>

You might also like