CS101 ASSIGNMENT SOLUTION

CS101 ASSIGNMENT SOLUTION

Assignment No. 02(Graded)

SEMESTER Spring 2017
CS101- Introduction to Computing

COPY THE CODE GIVE BELOW AND PASTE IT TO IN A TEXT FILE THE THEN SAVE IT WITH .html OR .htm Extension. Don't Forget to Write your name and Id in this Code as Mentioned Below.

CS101 ASSIGNMENT SOLUTION

<html>
<head>
<title>CS101</title>
<script>
function chkFilledFields() {
if (document.regForm.name.value<1)
window.alert("Please write you Name in Name field.")
if (document.regForm.cnic.value<1)
window.alert("Please provide your CNIC.")
if (document.regForm.course.value<1)
window.alert("Please provide your Course Name.")
if (document.regForm.session.value<1)
window.alert("Please provide you Session. Year only")
if (document.regForm.email.value<1)
window.alert("Email field empty! Please fill")
if (document.regForm.pswd.value<1)
window.alert("Please fill your password")
if (document.regForm.address.value<1)
window.alert("Please provide your adress.")
if (document.regForm.gender.value<1)
window.alert("Please provide your Gender. Male or Female")
if (document.regForm.city.value<1)
window.alert("Select your city.")
if (document.regForm.student.value<1)
window.alert("Select your status. New Student or Continuing ")
};
</script>
</head>
<body bgcolor="skyblue">
<h1 align="center">Student Name: .........XYZ........</h1><!-- HERE WRITE YOUR NAME-->
<h2 align="center">Student Id: PROVIDED BY VU</h2> <!--HERE WRITE YOUR ID-->
<br/>
<hr/>
<br/>
<h1 align="center">Registration Form</h1>
<br/>
<form name="regForm">
<table border="0" width="512" align="center" bgcolor="skyblue">
<tr>
<td>Name</td>
<td><input type="text" name="name" id="name"></td>
<td>CNIC</td>
<td><input type="text" name="cnic" id="cnic"></td>
</tr>
<tr>
<td>Course</td>
<td><input type="text" name="course" id="course"></td>
<td>Session</td>
<td><input type="text" name="session" id="session"></td>
</tr>
<tr>
<td>Email</td>
<td><input type="email" name="email" id="email"></td>
<td>Password</td>
<td><input type="password" name="pswd" id="pswd"></td>
</tr>
<tr>
<td>Address</td>
<td colspan="5"><textarea cols="22" id="address"></textarea></td>
</tr>
<tr colspan="2">
<td>Gender</td>
<td colspan="3"><input type="radio" name="gender" id="male" value="Male"> Male
<input type="radio" name="gender" id="female" value="Female">Female</td>
</tr>
<tr>
<td>City</td>
<td colspan="3">
<select name="city">
<option value="">---Select--- </option>
<option value="islamabad">Islamabad</option>
<option value="lahore">Lahore</option>
<option value="peshawar">Peshawar</option>
<option value="karachi">Karachi</option>
<option value="quetta">Quetta</option>
</select></td>
</tr>
<tr>
<td colspan="2">
<input type="checkbox" name="new_student" value="nstudent"> New Student
</td>
<td colspan="2"><input type="checkbox" name="con_student" value="constudent"> Continuing Student
</td>
</tr>
<tr>
<td colspan="2" align="right"><input type="submit" value="Submit" onClick="chkFilledFields()"></td>
<td colspan="2" align="left"><input type="reset" value="Reset"></td>
</tr>
</table>
</form>
</body>
</html>
DOWNLOAD SOLUTION FILE
Click Here to Download File
CS101 ASSIGNMENT NO:-2 SOLUTION








Next Post Previous Post