13
Computer Practical Exam 1. Registration form using HTML. (10) HTML CODE: <html> <head> <title> Registration Form </title> </head> <body> <center><table border=2> <tr> <td colspan=2><center>Registration Form</center></td> </tr> <tr> <td>Name:</td> <td><input type="text"></td>

12th Computer practical pattern (sci & com both)

Embed Size (px)

Citation preview

Page 1: 12th Computer practical pattern (sci & com both)

Computer Practical Exam

1. Registration form using HTML. (10)

HTML CODE:<html><head><title> Registration Form </title></head><body><center><table border=2><tr><td colspan=2><center>Registration Form</center></td></tr><tr><td>Name:</td><td><input type="text"></td></tr><tr><td>Address:</td><td><textarea rows=5 cols=30></textarea></td>

Page 2: 12th Computer practical pattern (sci & com both)

</tr><tr><td>Gender:</td><td><input type="radio" name="gender">Male<input type="radio" name="gender">Female</td></tr><tr><td>Hobbies:</td><td><input type="checkbox">Reading<input type="checkbox">Writing<input type="checkbox">Dancing</td></tr><tr><td>City:</td><td><select name="city"><option>Surat</option><option>Mumbai</option><option>Rajkot</option><option>Pune</option></select></td></tr><tr><td colspan=2><center><input type="submit" name="submit">&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp<input type="reset" name="reset"></td></center></tr></table></center></body></html>

Page 3: 12th Computer practical pattern (sci & com both)

2. CSS. (05)

Page 4: 12th Computer practical pattern (sci & com both)
Page 5: 12th Computer practical pattern (sci & com both)
Page 6: 12th Computer practical pattern (sci & com both)
Page 7: 12th Computer practical pattern (sci & com both)
Page 8: 12th Computer practical pattern (sci & com both)
Page 9: 12th Computer practical pattern (sci & com both)

3. Registration form in KompoZer. (05)

Page 10: 12th Computer practical pattern (sci & com both)

4. Registration form validation using JavaScript. (10)

Javascript code for validation:<html><head><meta content="text/html; charset=ISO-8859-1"http-equiv="content-type"><title>regi</title><script>function validateform(){var x=document.form1.name.value;var y=document.form1.pincode.value;if(x==null || x==""){alert("Please enter your name");document.form1.name.focus();return false;}if(y=="" || isNaN(y) || y.length<6 || y.length>6){alert("Please enter your pincode");document.form1.pincode.focus();

Page 11: 12th Computer practical pattern (sci & com both)

return false;}if((document.form1.gender[0].checked==false)&&(document.form1.gender[1].checked==false)){alert("Select your gender: Male or Female");document.form1.gender[0].focus();return false;}if((document.form1.singing.checked==false)&&(document.form1.dancing.checked==false)){alert("Select your atleast one hobby");document.form1.singing.focus();return false;}}</script></head>(Go to form properties-> Advanced edit-> Javascript event : write “return validateform()”)

Page 12: 12th Computer practical pattern (sci & com both)

5. Website. (20) 1. Design (10)

2. Scripting (10)

Name of all checkbox will be same. Here “add” is given name.

In every checkbox properties, write event name. Here: onchange=checkTotal().

(Go to form properties-> Advanced edit-> Javascript event : write “return validateform()”)

<script>function checkTotal() {document.index.Total.value =' ';var sum = 0;for (i=0;i<document.index.add.length;i++) {if (document.index.add[i].checked) {sum = sum + parseInt(document.index.add[i].value);} } document.index.Total.value = sum; }

function validateform() {if((document.index.add[0].checked==false) && (document.index.add[1].checked==false) && (document.index.add[2].checked==false)){ alert("Select atleast one option");document.index.add[0].focus();return false; }alert("Order Successfully Placed");}</script>