12 TH Science Sop 7 Till Last
12 TH Science Sop 7 Till Last
12 TH Science Sop 7 Till Last
<body>
</head>
</title>Colors<title> visiblyafter Create status
automatically bar.visibly
button shouldObjects.
tirst SOP
Background <head>
<html>color.html
<!DOCTYPEhtm> alert
message the button
another
distinct page object
distinct :Create 1
change Write
W
P-21 SOP HAND BOOK
TPS Information Technology (Science)
document.bgColor="red";
window.setTimeout("f2()",1500);
function f2()
document.bgColor="green'";
window.setTimeout("f3()",1500);
function f3()
document.bgColor-"pink";
window.setTimeout("f4)",1500);
function f4)
document.bgColor="orange";
window.setTimeout("5()"1500);
function f5()
TIS Intormation Technology (Science) P22 SOP HANDBOOK
document.bgColor="skyblue";
window.setTimeout("fe0" 1500):
function fo)
document.bgColor="voilet";
window.setTimeout("70",1500);
function f70)
document.bgColor="aqua";
window.setTimeout("f1()",1500);
function msg)
</script>
</html>
TPS intormation Technology (Science) P23
PHANOO%
colorl.html
DOCTYPE html>
<html>
head>
<title>
Background Colors
</titles
</head
<body onLoad="f1(0" onUnload="msg)">
<hl align="center">7 Different &visibly distinct background colors</hl>
</body>
<script type="text/javascript">
function f1()
document. bgColor="'red";
window.setTimeout("f20",1500);
function f2()
document.bgColor='"green";
window.set Timeout("f3(0",1500);
function f3()
document. bgColor="pink";
window.setTimeout("f40",1500);
function f4)
document.bgColor="orange";
window.setTimeout("50",1500);
function f5)
TPS Information Technology (Science) P-24 SOP HAND BOOK
document.bgColor="'skyblue":
window.setTimeout("f6()",1500);
function f6()
document.bgColor="voilet";
window.setTimeout("f7()",1500);
function f7()
document.bgColor="'aqua";
window.setTimeout("f1()",1500);
function msg)
</script>
</html>
Output:
essagefromwebpaige
Information Form
Your Name:
peEDenant addres
Address
Contact:
E-mail:
Submit
Coding :
email.html
<html>
cbody>
<form name="frm1">
Enter Name
<input type="text" name="t1"><br><br>
Enter Address<br>
<textareaname="t2" placeholder="PERMENANT
ADDRESS"></textarea><br><br>
Enter Telehpone Number
<input type="tel" maxlength="10"><br><br>
Enter Email Address
pattern="[A-Z a-z]|5)-(@]{1}--J1}"
<inputtype="'email" name="3"'
placeholder="lax2107@gmail.com"><br><br>
value="Submit" onClick="chk0">
<input type="button" name="b1"
</form>
</body>
TPS Information Technology
(Science) P-26 SOP HAND BOOK
<script type="text/javascripe">
function chk()
var x=frm1.t3.value;
var atpos=x.indexOf("@");
var lastat=x.lastIndexOf("@");
var firstdot=x.indexOf(".");
var dotpos =x.lastlndexOf(".");
alert("Emailaddress is accepted");
return true;
</script>
</html>
Output :
emaittm! +
Musbai
Submit
P-27 SOP HAND BOOK
TPS Information Technology (Science)
SOP 3 : Create event driven JavaScript program for the following. Make use of
appropriate variables, JavaScript inbuilt string functions and control structures.
To accept string from user and count number of vowels in the given string.
Coding :
<!DOCTYPE html>
<html>
<head>
<title>
String functions
</title>
</head>
cbody>
<form name="frm1">
Enter Your Name
<input type="text" name="t1"><br><br>
name="btncheck" value="Count Vowels" onClick="cnt()">
<inputtype="button"
</form>
</body>
<script type="text/javascript">
function cnt()
var s,i,ch,c;
c=0;
s=frm1.t1.value;
for(i-=0;j<=s.length;i++)
"+c);
alert("Number of Vowels in string are
</script>
</html>
TPS Information Technology (Science) P-28 SOP HAND BOOK
Output:
1elEXI SCIT 2020-21150P ¢ Search.
String functiens
Enter Your Namne iaxmi
Count Vowels
Ok
100%
SOP 4 :Create event driven JavaScript program for the following. Make use of
appropriate variables, JavaScript inbuilt string functions and controlstructures.
To accept string from user and reverse the given string and check whether it is
palindrome or not.
Coding :
palindrome.html
<!DOCTYPEhtml>
<html>
<head>
<title>
Palindrome
</title>
</head>
<body>
<form name="frm1">
Enter Your Name
<input type="text" name="t1"><br»<br>
<inputtype="button" name="btncheck" value="Check Palindrome"
onClick="chk()">
</form>
</body>
<script type="text/javascripe"'>
function chk()
var a,s,i,ch,n;
TPSInformaion Technology (Science) P-29 SOP HAND BOOK
a=frm1.t1.value;
s=a.toLowerCase();
n=s.length;
var p=1;
for(i=0; i<n/2;i++)
if(s.charAt(i)!= s.charAt(n-1-i)
p=0;
break;
if(p==1)
alert("String is Palindrome");
else
alert("String is not a Palindrome");
</script>
</html>
0
Output : ta X
Check Palindrome
Message from
String is Palindrome
OK
100%
Coding:
PHPUse program SOP
UseMinimum
functions.
action='age.php">
method="post"
age"><br><br>
type-"text"
<input Enter age.html
Yourage <form <hlcbody><html>
Decision
align="center">Person should :1
age Write
making required
include a PHP
statement. program
3.
for the
Server-Side
vote
following
Eligible
to
is check
18.
to
vote Scripting
if
a
or person
not</hl>
(PHP)
is
eligible
to
vote
or
not.
The
TPSInformation
Technology (Science) P-36 SOP HAND BOOK TP
?>
Output:
aqe.htrni X
File C/xampp/htdocs/php/..
Check Elgible
$str = strtolower($_POST['str']);
Svowels =array('a',e,",o,u);
$len = strlen($str);
Snum = 0;
for($i=0; $i<$len; $i++){
if(in_array($str[$i], $vowels))
$num+t;
Output: Search.
C:\xampp\htdocs\ php\S
Cxampp\htdocs\php\SO... x
String Functions
Enter Sring laxmi
Count Vowels
100%
operations on an
SOP 3 : Write a PHP program to perform the following
associative array.
Display elements of an array along with their keys.
Display the size of an array.
Delete an element from an array from the given index.
P-38
ANDBOOK
Coding :
array.php
<?php
$m1=
array("English"=>"55",
"Hindi"=>"60",
"Maths"=>"70",
"Marathi"=>"85"):
echo "<br><br><b>Elements of an array along with their keys :</b>;
echo "<br> <br> Your score".$m1['English']. " in English";
echo "<br> <br> Your score".$m1[Hindi']."in Hindi";
echo "<br> <br> Your score".$ml['Maths']. " in Maths";
echo "<br> <br Your score".Sm1['Marathi'l. " in Marathi";
echo "<br><br><b>Size of an array is :</b>".count(m1);
array_splice($m1,0,1);
echo "<br><br><b>After deleting array is :</b>";
foreach($m1 as $x => $x_value)
?>
Output : locainost/php/SOP3/array.php
O locaihost/php/SOP3/array.php
Size of an array is 4
Key=Maths, Value=70
Key=Marathi, Value-85
BOOK
AND
Output :
Coding : TPS
Intormation
?>
"<br><br>
echo $t=$t+$a[$x];
echo
$p=$t100/500; echo along and SOP
$c=count($a); $x=0;$t=0;
for($x=0;$x<$c;$x
++) <?php
marks.php:
(60,78,74,85,96);
$a=array
"<br><br> "<br><br> Information
with 4
enatge 1s
Toral Marks
is Marks
subject.74
Marks inMarkslocaihost/php/sCP4/marks
subject.78 Marks
in 3 :
Write
Technology
in in in total
.393 subjectsubject subject
a
78.6 Percenatge Total Marks marks
96 .85 .60 Technology PHP(Science)
localhost/php/SOP4/marksl.php
is in andprogram
l.php x :.$t";
subject
is percentage.
$p"; : in to
.$a[$x]"; an
save
P-39
array.
marks
Display
of
English,
marks
Hindi,
of
individual
Marathi, HAND
BOOKSOP
subjectMaths