SlideShare a Scribd company logo
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>
</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>
2. CSS. (05)
3. Registration form in KompoZer. (05)
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();
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()”)
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>

More Related Content

Similar to 12th Computer practical pattern (sci & com both)

Form & frame
Form & frameForm & frame
Form & frame
aminsir
 
data insert in codeigniter.pptx
data insert in codeigniter.pptxdata insert in codeigniter.pptx
data insert in codeigniter.pptx
feesfesfesf
 
Railway res form
Railway res formRailway res form
Railway res form
suma Latha
 
Html 5-tables-forms-frames (1)
Html 5-tables-forms-frames (1)Html 5-tables-forms-frames (1)
Html 5-tables-forms-frames (1)
club23
 
Html - Tables, Forms and Frames by Telerik Academy
Html - Tables, Forms and Frames by Telerik AcademyHtml - Tables, Forms and Frames by Telerik Academy
Html - Tables, Forms and Frames by Telerik Academy
Ognyan Penkov
 

Similar to 12th Computer practical pattern (sci & com both) (20)

Form & frame
Form & frameForm & frame
Form & frame
 
Lect# 1 html part ii
Lect# 1 html part iiLect# 1 html part ii
Lect# 1 html part ii
 
Lab final
Lab finalLab final
Lab final
 
data insert in codeigniter.pptx
data insert in codeigniter.pptxdata insert in codeigniter.pptx
data insert in codeigniter.pptx
 
Computer Html Links
Computer Html Links Computer Html Links
Computer Html Links
 
Railway res form
Railway res formRailway res form
Railway res form
 
Webpro2 pert6 7_login_menu_
Webpro2 pert6 7_login_menu_Webpro2 pert6 7_login_menu_
Webpro2 pert6 7_login_menu_
 
HTML Tables and Forms
HTML Tables and Forms HTML Tables and Forms
HTML Tables and Forms
 
Html
HtmlHtml
Html
 
Java script form validation
Java script  form validationJava script  form validation
Java script form validation
 
Tables and their padding in HTML etc.pptx
Tables and their padding in HTML etc.pptxTables and their padding in HTML etc.pptx
Tables and their padding in HTML etc.pptx
 
Practicals it
Practicals itPracticals it
Practicals it
 
html file
html filehtml file
html file
 
Html 5-tables-forms-frames (1)
Html 5-tables-forms-frames (1)Html 5-tables-forms-frames (1)
Html 5-tables-forms-frames (1)
 
Html tables examples
Html tables   examplesHtml tables   examples
Html tables examples
 
01 HTML-Tables-1.pptx
01 HTML-Tables-1.pptx01 HTML-Tables-1.pptx
01 HTML-Tables-1.pptx
 
vue-components.pdf
vue-components.pdfvue-components.pdf
vue-components.pdf
 
Sessionex1
Sessionex1Sessionex1
Sessionex1
 
Html - Tables, Forms and Frames by Telerik Academy
Html - Tables, Forms and Frames by Telerik AcademyHtml - Tables, Forms and Frames by Telerik Academy
Html - Tables, Forms and Frames by Telerik Academy
 
HTML: Tables and Forms
HTML: Tables and FormsHTML: Tables and Forms
HTML: Tables and Forms
 

Recently uploaded

Recently uploaded (20)

Pragya Champions Chalice 2024 Prelims & Finals Q/A set, General Quiz
Pragya Champions Chalice 2024 Prelims & Finals Q/A set, General QuizPragya Champions Chalice 2024 Prelims & Finals Q/A set, General Quiz
Pragya Champions Chalice 2024 Prelims & Finals Q/A set, General Quiz
 
The Last Leaf, a short story by O. Henry
The Last Leaf, a short story by O. HenryThe Last Leaf, a short story by O. Henry
The Last Leaf, a short story by O. Henry
 
Telling Your Story_ Simple Steps to Build Your Nonprofit's Brand Webinar.pdf
Telling Your Story_ Simple Steps to Build Your Nonprofit's Brand Webinar.pdfTelling Your Story_ Simple Steps to Build Your Nonprofit's Brand Webinar.pdf
Telling Your Story_ Simple Steps to Build Your Nonprofit's Brand Webinar.pdf
 
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
 
Basic Civil Engg Notes_Chapter-6_Environment Pollution & Engineering
Basic Civil Engg Notes_Chapter-6_Environment Pollution & EngineeringBasic Civil Engg Notes_Chapter-6_Environment Pollution & Engineering
Basic Civil Engg Notes_Chapter-6_Environment Pollution & Engineering
 
Instructions for Submissions thorugh G- Classroom.pptx
Instructions for Submissions thorugh G- Classroom.pptxInstructions for Submissions thorugh G- Classroom.pptx
Instructions for Submissions thorugh G- Classroom.pptx
 
Benefits and Challenges of Using Open Educational Resources
Benefits and Challenges of Using Open Educational ResourcesBenefits and Challenges of Using Open Educational Resources
Benefits and Challenges of Using Open Educational Resources
 
Mattingly "AI & Prompt Design: Limitations and Solutions with LLMs"
Mattingly "AI & Prompt Design: Limitations and Solutions with LLMs"Mattingly "AI & Prompt Design: Limitations and Solutions with LLMs"
Mattingly "AI & Prompt Design: Limitations and Solutions with LLMs"
 
Operations Management - Book1.p - Dr. Abdulfatah A. Salem
Operations Management - Book1.p  - Dr. Abdulfatah A. SalemOperations Management - Book1.p  - Dr. Abdulfatah A. Salem
Operations Management - Book1.p - Dr. Abdulfatah A. Salem
 
The Art Pastor's Guide to Sabbath | Steve Thomason
The Art Pastor's Guide to Sabbath | Steve ThomasonThe Art Pastor's Guide to Sabbath | Steve Thomason
The Art Pastor's Guide to Sabbath | Steve Thomason
 
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
 
How to Create Map Views in the Odoo 17 ERP
How to Create Map Views in the Odoo 17 ERPHow to Create Map Views in the Odoo 17 ERP
How to Create Map Views in the Odoo 17 ERP
 
50 ĐỀ LUYỆN THI IOE LỚP 9 - NĂM HỌC 2022-2023 (CÓ LINK HÌNH, FILE AUDIO VÀ ĐÁ...
50 ĐỀ LUYỆN THI IOE LỚP 9 - NĂM HỌC 2022-2023 (CÓ LINK HÌNH, FILE AUDIO VÀ ĐÁ...50 ĐỀ LUYỆN THI IOE LỚP 9 - NĂM HỌC 2022-2023 (CÓ LINK HÌNH, FILE AUDIO VÀ ĐÁ...
50 ĐỀ LUYỆN THI IOE LỚP 9 - NĂM HỌC 2022-2023 (CÓ LINK HÌNH, FILE AUDIO VÀ ĐÁ...
 
Jose-Rizal-and-Philippine-Nationalism-National-Symbol-2.pptx
Jose-Rizal-and-Philippine-Nationalism-National-Symbol-2.pptxJose-Rizal-and-Philippine-Nationalism-National-Symbol-2.pptx
Jose-Rizal-and-Philippine-Nationalism-National-Symbol-2.pptx
 
Danh sách HSG Bộ môn cấp trường - Cấp THPT.pdf
Danh sách HSG Bộ môn cấp trường - Cấp THPT.pdfDanh sách HSG Bộ môn cấp trường - Cấp THPT.pdf
Danh sách HSG Bộ môn cấp trường - Cấp THPT.pdf
 
Basic Civil Engineering Notes of Chapter-6, Topic- Ecosystem, Biodiversity G...
Basic Civil Engineering Notes of Chapter-6,  Topic- Ecosystem, Biodiversity G...Basic Civil Engineering Notes of Chapter-6,  Topic- Ecosystem, Biodiversity G...
Basic Civil Engineering Notes of Chapter-6, Topic- Ecosystem, Biodiversity G...
 
The impact of social media on mental health and well-being has been a topic o...
The impact of social media on mental health and well-being has been a topic o...The impact of social media on mental health and well-being has been a topic o...
The impact of social media on mental health and well-being has been a topic o...
 
MARUTI SUZUKI- A Successful Joint Venture in India.pptx
MARUTI SUZUKI- A Successful Joint Venture in India.pptxMARUTI SUZUKI- A Successful Joint Venture in India.pptx
MARUTI SUZUKI- A Successful Joint Venture in India.pptx
 
[GDSC YCCE] Build with AI Online Presentation
[GDSC YCCE] Build with AI Online Presentation[GDSC YCCE] Build with AI Online Presentation
[GDSC YCCE] Build with AI Online Presentation
 
Morse OER Some Benefits and Challenges.pptx
Morse OER Some Benefits and Challenges.pptxMorse OER Some Benefits and Challenges.pptx
Morse OER Some Benefits and Challenges.pptx
 

12th Computer practical pattern (sci & com both)

  • 1. 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> </tr>
  • 2. <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>
  • 4.
  • 5.
  • 6.
  • 7.
  • 8.
  • 9. 3. Registration form in KompoZer. (05)
  • 10. 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();
  • 11. 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()”)
  • 12. 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>