0% found this document useful (0 votes)
14 views

CSS PR7 Writeup

Uploaded by

ahirekalpesh64
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
14 views

CSS PR7 Writeup

Uploaded by

ahirekalpesh64
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 11

<html>

<head>
<h2> Practical 7 : Create a web page to implement form events.
(Part-I)</h2>
<h3> Student Enrollment Form!</h3>
<style>
.bordered
{
width :500px;
Height: 450px;
border: 1px solid grey;
}
form
{
margin:6px;
}
</style>
</head>
<Body >
<div class="bordered">
<form name="new" method="post" action="#" ><br>
<label for ="code">All the fields marked with ' * ' are
compulsary.</label></br></br>
Course Code:*
<input type="text" id="Code" value=" 00CO24" disabled
></br></br>
Roll Number:*
<input type="text" id="rnum" required></br></br>
Student Name:*
<input type="text" id="sname" required></br></br>
Email:*
<input type="email" id="eid" required></br></br>
Password:*
<input type="password" id="pwd1" required></br></br>
Confirm Password:*
<input type="password" id="pwd2" required></br></br>
Gender:*
<input type="radio" name="radio1" value="Male" checked>Male
<tb>
<input type="radio" name="radio1" value="female"> Female
</br></br>
Language:*
<input type="checkbox" name="checkbox1" value="English"
checked>English<tb>
<input type="checkbox" name="checkbox1"
value="Hindi">Hindi<tb>
<input type="checkbox" name="checkbox1"
value="Marathi">Marathi<tb></br></br>
<input type="checkbox" name="checkbox2"> All the above
information is correct.<tb></br></br>
<input type="submit" name="submit" value="Submit"
onclick="Validate()"> <tb>
<input type="reset" name="reset" value="Reset"></br></br>
</div>
<script>
function Validate()
{
var rno=document.getElementById("rnum").value;
a=parseInt(rno)
var myname=document.forms.new.sname.value;
var Mail=document.getElementById("eid").value;
var pass1=document.getElementById("pwd1").value;
var pass2=document.getElementById("pwd2").value;
if(a <1 || a >52)
{
alert("Please enter roll number between 1 to 51");
}
if(isNaN(a))
{
alert("Please enter Numbers Only");
}
if(pass1.length<6)
{
alert("Password must be more than 6 characters.");
}
if( pass1== pass2)
{
document.write("Roll Number : " +a + "<br>");
document.write("Name : " +myname+ "<br>");
document.write("Email : " +Mail+ "<br>");
document.write("Password : " +pass1+ "<br>");
alert("Registration Completed!!");
return true;
}
else
{
alert("Password and Confirm Password Not Match.");
}
}
</script>
</form>
</Body>
</html>

You might also like