Click Here!

Saturday, 27 August 2016

LOGIN FORM IN HTML AND JAVASCRIPT


 

JavaScript and HTML Login Form 


This is a login form which designed in HTML and JavaScript languages which is used for a user open the website or a page which user you wants. Here is no PHP and MYSQL are requried.


This is the JavaScript codes used for validation


<script language="javascript">
<!--//
/*This Script allows people to enter by using a form that asks for a
UserID and Password*/
function pasuser(form) {
if (form.id.value=="javascript") {
if (form.pass.value=="kit") {             
location="page2.html"
} else {
alert("Invalid Password")
}
} else {  alert("Invalid UserID")
}
}
//-->
</script>


 This is the HTML codes used for the viewing the form

<center>
<table bgcolor="white" cellpadding="12" border="1">
<tr><td colspan="2"><center><h1><i><b>Login
Area</b></i></h1></center></td></tr>
<tr><td><h1><i><b>UserID:</b></i></h1></td><td><form name="login"><input
name="id" type="text"></td></tr>
<tr><td><h1><i><b>Password:</b></i></h1></td><td><input name="pass"
type="password"></td></tr>
<tr><td><center><input type="button" value="Login"
onClick="pasuser(this.form)"></center></td><td><center><br><input
type="Reset"></form></td></tr></table></center>





So this is simple login form used for validation to open the page or website.

No comments :

Post a Comment