You are on page 1of 4

<html>

<head>
<title>Student Registration Form</title>
<script type="text/javascript">
function validateForm()
{
var x=document.forms["myForm"]["fname"].value;
if (x==null||x=="")
{
document.forms["myForm"]["fnamevalid"].bold
document.forms["myForm"]["fnamevalid"].value="First Name must be filled out";
}
var x=document.forms["myForm"]["email"].value;
var atpos=x.indexOf("@");
var dotpos=x.lastIndexOf(".");
if (atpos<1 || dotpos<atpos+2 || dotpos+2>=x.length)
{
document.forms["myForm"]["emailvalid"].value="Email Wrong";
return false;
}
}
</script>
</head>
<form name="myForm">
<body>
<center>
<marquee>
<h3>STUDENT REGISTRATION FORM</h3></center></marquee>
<table align="center" cellpadding = "10">
<!----- First Name ---------------------------------------------------------->
<tr>
<td>FIRST NAME</td>
<td><input type="text" name="fname" maxlength="30"/></td>
<td><input type="text" name="fnamevalid"
#000000; readonly />

size ="40" style="border: 0px solid

</td>
</tr>
<!----- Last Name ---------------------------------------------------------->
<tr>
<td>LAST NAME</td>
<td><input type="text" name="Last_Name" maxlength="30"/>
(max 30 characters a-z and A-Z)
</td>

</tr>
<!----- Date Of Birth -------------------------------------------------------->
<tr>
<td>DATE OF BIRTH</td>
<td>
<select name="Birthday_day" id="Birthday_Day">

<option
<option
<option
<option

value="-1">Day:</option>
value="1">1</option>
value="2">2</option>
value="3">3</option>

<option
<option
<option
<option
<option
<option
<option
<option
<option

value="4">4</option>
value="5">5</option>
value="6">6</option>
value="7">7</option>
value="8">8</option>
value="9">9</option>
value="10">10</option>
value="11">11</option>
value="12">12</option>

<option
<option
<option
<option
<option
<option
<option
<option
<option

value="13">13</option>
value="14">14</option>
value="15">15</option>
value="16">16</option>
value="17">17</option>
value="18">18</option>
value="19">19</option>
value="20">20</option>
value="21">21</option>

<option value="22">22</option>
<option value="23">23</option>
<option value="24">24</option>
<option value="25">25</option>
<option value="26">26</option>
<option value="27">27</option>
<option value="28">28</option>
<option value="29">29</option>
<option value="30">30</option>
<option value="31">31</option>
</select>

<select
<option
<option
<option
<option
<option

id="Birthday_Month" name="Birthday_Month">
value="-1">Month:</option>
value="January">Jan</option>
value="February">Feb</option>
value="March">Mar</option>
value="April">Apr</option>

<option
<option
<option
<option
<option
<option
<option
<option

value="May">May</option>
value="June">Jun</option>
value="July">Jul</option>
value="August">Aug</option>
value="September">Sep</option>
value="October">Oct</option>
value="November">Nov</option>
value="December">Dec</option>

</select>
<select name="Birthday_Year" id="Birthday_Year">
<option value="-1">Year:</option>
<option value="1991">1991</option>
<option value="1990">1990</option>
<option value="1989">1989</option>
<option value="1988">1988</option>
<option value="1987">1987</option>
<option value="1986">1986</option>
<option value="1985">1985</option>
<option value="1984">1984</option>
<option value="1983">1983</option>
<option value="1982">1982</option>
<option value="1981">1981</option>
<option value="1980">1980</option>
</select>
</td>
</tr>
<!----- Email Id ---------------------------------------------------------->
<tr>
<td>EMAIL ID</td>
<td><input type="text" name="email" maxlength="100" /></td>
<td><input type="text" name="emailvalid" size ="40" style="border: 0px solid #0
00000; readonly /></td>
</tr>
<!----- Mobile Number --------------------------------------------------------->
<tr>
<td>MOBILE NUMBER</td>
<td>
<input type="text" name="Mobile_Number" maxlength="12" />
(12 digit number)
</td>
</tr>
<!----- Gender ----------------------------------------------------------->
<tr>
<td>GENDER</td>
<td>
Male <input type="radio" name="Gender" value="Male" />
Female <input type="radio" name="Gender" value="Female" />
</td>

</tr>
<!----- Address ---------------------------------------------------------->
<tr>
<td>ADDRESS <br /><br /><br /></td>
<td><textarea name="Address" rows="4" cols="30"></textarea></td>
</tr>
<!----- Submit and Reset ------------------------------------------------->
<tr>
<td colspan="2" align="center">
<input type="button" value="Submit" onclick="validateForm()">

</td>
</tr>
</table>
</form>
</body>
</html>