CODE FOR REGISTRATION FORM
<html>
<head>
<script>
function submit1()
{
var a=document.form.name.value;
var b=document.form.mobile.value;
var c=document.form.email.value;
var d=document.form.address.value;
var e=document.form.pin.value;
var f=document.form.password.value;
var g=document.form.confirm.value;
var apos=c.indexOf("@");
var dpos=c.lastIndexOf(".");
if(a=="")
{
alert("enter your name");
}
else if(b.length!=10 )
{
alert("enter valid mobile number");
}
else if(dpos - apos <2)
{
alert("enter valid E-mail Address ");
}
else if(e.length!=6)
{
alert("enter 6 Digit pin Code");
}
else if(f!=g)
{
alert("enter correct password!!!");
}
else
{
alert("your form submitted successfully");
}
}
</script>
<style>
body
{
background-image:linear-gradient(rgb(255, 0, 157),rgb(28, 107, 255));
}
/* h1
{
background: -webkit-linear-gradient( darkblue,rgb(0, 255, 106));
-webkit-background-clip: text;
-webkit-text-fill-color: transparent;
}*/
table
{
height:100%;
font-size: 30px;
background-image:linear-gradient(rgb(132, 132, 170),rgb(71, 226, 226));
}
#a
{
margin:10px 200px 20px 200px;
background-image:linear-gradient(rgb(81, 81, 150),rgb(71, 226, 226));
}
#b
{
border-radius: 24px;
height:35px;
width:250px;
}
#c
{
border-radius: 24px;
height:35px;
width:250px;
}
#d
{
border-radius: 24px;
height:150px;
width:250px;
}#e
{
border-radius: 24px;
height:35px;
width:250px;
}
#f
{
border-radius: 24px;
height:35px;
width:250px;
}
#g
{
border-radius: 24px;
height:35px;
width:250px;
}
#h
{
border-radius: 24px;
height:35px;
width:250px;
}
</style>
</head>
<body>
<div id="a">
<center><h1><font color="YELLOW" size="7">REGISTRATION FORM</font></h1></center>
<form method="post" name="form">
<center> <table cellborder="0" cellspacing="0"></center>
<tr>
<th>Name:</th>
<th><input type="text" name="name" id="h" required></th>
</tr>
<tr>
<th>Mobile No.:</th>
<th><input type="text" maxlength="10" name="mobile" id="b" required></th>
</tr>
<tr>
<th>E-mail ID:</th>
<th><input type="text" name="email" id="c" required></th>
</tr>
<tr>
<th>Address:</th>
<th>
<textarea rows="10" cols="40" name="address" id="d" required></textarea>
</th>
</tr>
<tr>
<th>
Pin Code:
</th>
<th>
<input type="number" name="pin" id="g" required>
</th>
</tr>
<tr>
<th>password:</th>
<th><input type="password" name="password" id="e" required></th>
</tr>
<tr>
<th>confirm password:</th>
<th><input type="password" name="confirm" id="f" required></th>
</tr>
<tr><th><input type="reset" value="reset"></th>
<th><input type="submit" value="submit" onclick="submit1()"></th></tr>
</table>
<br>
</form>
</div>
</body>
</html>
<head>
<script>
function submit1()
{
var a=document.form.name.value;
var b=document.form.mobile.value;
var c=document.form.email.value;
var d=document.form.address.value;
var e=document.form.pin.value;
var f=document.form.password.value;
var g=document.form.confirm.value;
var apos=c.indexOf("@");
var dpos=c.lastIndexOf(".");
if(a=="")
{
alert("enter your name");
}
else if(b.length!=10 )
{
alert("enter valid mobile number");
}
else if(dpos - apos <2)
{
alert("enter valid E-mail Address ");
}
else if(e.length!=6)
{
alert("enter 6 Digit pin Code");
}
else if(f!=g)
{
alert("enter correct password!!!");
}
else
{
alert("your form submitted successfully");
}
}
</script>
<style>
body
{
background-image:linear-gradient(rgb(255, 0, 157),rgb(28, 107, 255));
}
/* h1
{
background: -webkit-linear-gradient( darkblue,rgb(0, 255, 106));
-webkit-background-clip: text;
-webkit-text-fill-color: transparent;
}*/
table
{
height:100%;
font-size: 30px;
background-image:linear-gradient(rgb(132, 132, 170),rgb(71, 226, 226));
}
#a
{
margin:10px 200px 20px 200px;
background-image:linear-gradient(rgb(81, 81, 150),rgb(71, 226, 226));
}
#b
{
border-radius: 24px;
height:35px;
width:250px;
}
#c
{
border-radius: 24px;
height:35px;
width:250px;
}
#d
{
border-radius: 24px;
height:150px;
width:250px;
}#e
{
border-radius: 24px;
height:35px;
width:250px;
}
#f
{
border-radius: 24px;
height:35px;
width:250px;
}
#g
{
border-radius: 24px;
height:35px;
width:250px;
}
#h
{
border-radius: 24px;
height:35px;
width:250px;
}
</style>
</head>
<body>
<div id="a">
<center><h1><font color="YELLOW" size="7">REGISTRATION FORM</font></h1></center>
<form method="post" name="form">
<center> <table cellborder="0" cellspacing="0"></center>
<tr>
<th>Name:</th>
<th><input type="text" name="name" id="h" required></th>
</tr>
<tr>
<th>Mobile No.:</th>
<th><input type="text" maxlength="10" name="mobile" id="b" required></th>
</tr>
<tr>
<th>E-mail ID:</th>
<th><input type="text" name="email" id="c" required></th>
</tr>
<tr>
<th>Address:</th>
<th>
<textarea rows="10" cols="40" name="address" id="d" required></textarea>
</th>
</tr>
<tr>
<th>
Pin Code:
</th>
<th>
<input type="number" name="pin" id="g" required>
</th>
</tr>
<tr>
<th>password:</th>
<th><input type="password" name="password" id="e" required></th>
</tr>
<tr>
<th>confirm password:</th>
<th><input type="password" name="confirm" id="f" required></th>
</tr>
<tr><th><input type="reset" value="reset"></th>
<th><input type="submit" value="submit" onclick="submit1()"></th></tr>
</table>
<br>
</form>
</div>
</body>
</html>
Comments
Post a Comment