0% found this document useful (0 votes)
2 views25 pages

Javascript

The document contains various JavaScript code snippets demonstrating the use of conditional statements such as 'if' and 'switch', as well as array manipulation. It includes prompts for user input and displays messages based on the input values. The code examples illustrate basic programming concepts in JavaScript, including arrays, loops, and conditional logic.

Uploaded by

Poonam Kharte
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)
2 views25 pages

Javascript

The document contains various JavaScript code snippets demonstrating the use of conditional statements such as 'if' and 'switch', as well as array manipulation. It includes prompts for user input and displays messages based on the input values. The code examples illustrate basic programming concepts in JavaScript, including arrays, loops, and conditional logic.

Uploaded by

Poonam Kharte
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

ECAUsersAbc\Documents JavaScript 28 March If Structure.

htm-Sublime Text (UNREGISTERED)


File Edit Selection Find View Goto Tools Project Preferences Help

Javascript 26 March 22ehtm avaacript 25 March 22 Switch s e Statementhtm* Javaacript 28 March 22 Switdh ase [Link] rch If [Link]*

1 <!DOCTYPE html>
2 <html>
head
title>If Statment</title»
5 </head
6 body>
<script type="text/javascript">
var name = prompt("Please Input Your Name: ")

10
var gender =prompt("Please Write Your Gender"
"Male/Female ");
L2
if (gender == "Male")
13
14
15
alert ("Hello Mr."
+name)
else

alert ("Hello Miss. " + name);


L8
19

20 </script
21 </body>
22 </html>

Line13, Column 6 Tab Size 4 HTML


11:21 AM
4) NG 28-Mar-22
UsersADC\DOcumentsuavascript Array April [Link]- u . . wN F x+
File Edit Selection Find View Goto Tools Project Preferences Help

Java script Dialog Box April [Link] JavaScript Array1 Apri 22htm
C OFile [Link]
» Other bookmarks
OnlineSBI BSNL WebSelfCare
2 <html>
3 <head>
4
<title>For Staement</title> Program For Using for Arrays
5 </head> Sarthak
6 <body> Shyam
<h3>Program For Using for Arrays </ Mohan
amal
8 <script type="text/javascript" Anil
9
Sunita
/var ary = [10, 20, 30, 40, 50]; Monika
10 ary =new Array (10) Al
11 ary[0]-"Sarthak"; Rahul
12 ary[1]="Shyam" Shamli
13 ary[2]="Mohan"
14 ary[3]="Kamal1";
15 ary[4]="Anil";
16 ary[5]="Sunita"s
17 ary[6]="Monika";
18 ary[7]="Anil":
19 ary[8]="Rahul";
20 ary[9]="Shamli";
21
for(var a=0; ac=9; at+)
22 {
23 document . write (ary[a]. "<br>") ;
24

25 </script»
26 </body>
</html>
Line 16, Column 1 Tab Size: 4 HTML

9.29 AM E
) E13-Apr-22
CUsersAbcIDocumentsuavascript Arrayz 31 March [Link] -

File Edit Selection Find View Goto Tools Project Preferences Help
X O File [Link] x
Javascript Aray1 April [Link] Javaacript Array2 31 March [Link]

1 <!DOCTYPE html> This page says


2 <html> Please Input Yours Name
3 <head>
4
title>For Staement</title
5 </head>
6 <body> OK Cancel
7 h3>Program For Using for Arrays </
h3>
8 script type="text/javascript">

10
9
ary =new Array (10);
ary[e]-prompt ("Please Input Yours
Name )
11
ary[1]-prompt("Please
Name )
Input Yours
12 aryt2]=prompt ("Please Input Yours
Name ")
13 aryt3]-prompt("Please Input Yours
Name);
14
aryf4]=prompt("Please Input Yours
Name");
15 ary[5]-prompt("Please Input Yours
Name);
16 aryt6]-prompt ("Please Input Yourrs
Name " )
17
ary[7]-prompt
Name ")
("Please Input Yours

18
ary[8]=prompt("Please Input Yours
L i n e10, Column 1 Tab Size 4 HTML

9:30 AM
N9 ) Apr-22
UsersADC\DOcumentsuavascript Array231March [Link]
"

File Edit Selection Find View Goto Tools Project Preferences Help

JavaacriptArray1 April [Link] Javaacript Array2 31 March [Link] X O File [Link]


Name"); This page says
11
ary[1]=prompt("Please
Name )5
Input Yours Please Input Yours Name

12 ary[2]-prompt ("Please Input Yours


Name");
13 ary[3]-prompt ("Please Input Yours OK Cancel
Name ");
14 ary[4]-prompt ("Please Input Yours
Name ");
15
ary[5]-prompt("Please
Name ")
Input Yours
16 aryt6]-prompt ("Please Input Yours
Name )
17 ary[7]=prompt("Please
Name ") 5
Input Yours
18 ary[8]-prompt("Please Input Yours
Name )5
19
ary[9]-prompt("Please
Name ")
Input Yours
20
21
for(var a-0; a<=9; a++)
22
23
document write(ary[a], "cbr> ") ;
.

24 }
25 </script>
26 </body>
27
/html>
L i n e 10, Column 1 Tab Size: 4 HTML

) 13-Apr-22 )
ECUsers Abe\ DocumentsiJavaScript Switch Case 1 April [Link] -

Sublime Text (UNREGISTERED)


X+
File tdit Selection ind View Goto lools Project Preferences Help
(40 We W
Javascript Arrayt April [Link] JavaScript Array2 31 March 22htm Javascript Switch Case 1 April [Link]
X O File | [Link] 1

1 <!DOCTYPE html> This page says


2 <html> Please Input Your Marks
3 <head>
4 <title>For Staement</title>
5</head>
6 <body>
For Switch Case </h3>»
7

<h3>Program
8 <script type="text/javascript">

10
9var a
1/
=prompt ("Please
var age=85 ;
Input Your
Marks");
11 switch (true)
12 {
13 case (a>= 80 && ac= 1eo):document. write( "You Are in
Merit") ;
14 break,
15 case (a>= 60 && ac= 80):document. write ("You Are in
Ist Devision") ;
16 break;
17 case (a>= 45 &8 ac= 60):document. write("You Are in
IInd Devision ");
18 break
19 case (a >=33 && ac= 45) : document . write ("You Are in
Third Devision") ;
20 breaks
21 case (a -0 && a<33) :document. write ( "You Are Fail1")
22 break
23 default:[Link]("Please Enter Valid Percentage")
1 characters Tab Size 4 WhatsApp image.-JpEg
se etted
:13 AM
) ENG 13-Apr-22 6
C:Users\Abc\ Documents Javaacript Switch Case 1 April [Link] -Sublime Text (UNREGISTERED) +
File Edit election Find View Goto loos Project Preferences Help
(40 We We X

JavaScript Aray1 April [Link] JavaScript Array2 31 March 22htm JavaScript Switch Case 1 April [Link] X OFile file:/I/c:/Users/
<h3>Program For Switch Case </h3> This page says
8
script type="text/javascript">
Please Input Your Marks
9Var a Input Your
=prompt("Please Marks ");
10 // var age=85;
11 Switch (true)
12
13 case (a>= 80 && ax= 10e) : document. write ( "You Are in
Merit")
14 break;
15 case (a>= 60 &8 a= 80):document. write("You Are in
Ist devision")
16 break;
17 case (a>= 45 && ac= 60): document. write ("You Are in
IInd Devision ");
18 break;
19 case (a >=33 &8& ac= 45) :document. write( "You Are in
Third Devision") ;
20 break;
21 case (a >=0 && a<33): document. write("You Are Fail")
22 breaks
23 default : document. write("Please Enter Valid Percentage")

24
25 </script>
26 /body>
27 </html>
1characters selected Tab Size 4 WhatsAPp imag.-pE
4) ENG13-Apr-22 E
CNUsers Abc\DocumentsJavaScript April [Link]- Sublime Text (UNREGISTERED)
ile tdit Selection ind View Goto lools Project Preferences Help
V| F X+
JavaScript April [Link]
C File [Link] 1
1 <!DOCTYPE html> OnlineSBI BSNL Web Self Care

2 <html>
<head> Program For If Else Statement

</head>
<title>For Staement</title» You Are Fail

6 <body>
7 <h3>Program For If Else Statement </h3>
8 <script type="text/javascript">
9 var a-prompt ( "Please Input Ur Name") ;
10
11 if (a>= 80 && a<= 100)
12
13
14
document. write("You Are in Merit");
15
else if (a>= 60 &8 ac= 80)
16
17
18
document. write("You Are in Ist Devision ") ;
19
20
else if (a>= 45 && ac= 60)
21 document. write("You Are in IInd Devision") ;
22
23
24
else if (a>= 33 && ac= 45)
25 document. write ("You Are in IIIrd Devision"):}
26 else if (a>=1 && a= 32)
2/
Line 10, Column Tab Sze 4 WhatsApp [Link]
9) ENG TH14 AM
13-Apr-22 6
CUsers\Abc\ Documentsl JavaScript April [Link]- Sublime Text (UNREGISTERED)
ile tdit selection ind View Goto lools Project Preferences Help

Javaacript April [Link] C OFile [Link]


10 OnlineSBi BSNL Web Self Care..
11 if (a>= 80 && a<=
100)
12 { Program For If Else Statement
13 [Link]("You Are in Merit"); You Are Fail
14
15 else i f (a>= 60 && a = 80)
16
17 document. write ("You Are in Ist Devision") ;
18
19
28
else if (a>= 45 && ac= 60)
21
22
document write ("You Are in
. IInd
Devision");
23
24
else if (a>= 33 && ac= 45)
25 document. write("You Are in IIIrd Devision") ;}
26 else if (a>=1 && a= 32)
27
28 document. write("You Are Fail");
29
38 else
31
32 [Link]("Please Enter Valid Percentage");
33
34 /script>
35 </body>
36 </html> WhatsApp image..peg
L i n e 10, Column 1 Tab Sze4

9) ENG TE14 AM
13-Apr-22 6
C:Users\Abc\ Documents Javaacript Array1 31 March [Link] -

Sublime Text (UNREGISTERED)


File tdit Selection Find ViEw goto lools Project Preferences Help

C O File | [Link]
Java Script April [Link] x Javesaript Diaiog Box April [Link] x JavaScript Array1 31 March [Link]
OnlineSBl BSNL Web Self Care...
1 <!DOCTYPE html>
2 <html>
<head> Program For Using for Arrays

</head>
<title>For Staement</title> Ram, Shyam,Mohan,Kamal, Sunil

<body
for
78 th3>Program
<script type="text/javascript">
For Using Arrays </h3>
9 a= new Array(5) ;
16
11 a[e]-"Ram";
12 a[1]="shyam
13 a[2]-"Mohan";
14 a[3]="Kamal";
15 a[4]="Sunil";
16
17 //document. write (a [e]+a[1]+a[2]+a [3]+a [4]) ;
18 b=[Link]();
19 document. write(b);
20 /script>
21 </body>
22 </html>

Line 18, Column 12 Tab Size:4 WhatsApp [Link]


4) ENG 13-Apr-22
Sublime Text (UNREGISTERED)
CUserslAbc\DocumentslJavaacript [Link] -

+
Edit Selection ind View Goto lools Project Preferences Help
Ov F FX
rlie
C O File | [Link]
Javas JavaScript Dialog Bax April [Link]* JavaScript Array1 31 March 22htm Javaacript [Link]
1 <!DOCTYPE html> OnlineSBl BSNL Web Self Care...

2 <html>
<head> Program For Using for Arrays

<title>For Staement</title
</head>
6 <body> 0

<h3>Program For Using for Arrays </h3>


7

8 script type="text/javascript">

10 var b-[10, 20, 30,40, 50]


11
12
13
for(var a-0; ac=4; a++)
14
15
document. write (b[a]-"<br>");
16

17 </script>
18 </body>
19 </html>

L i n e 16, Column 1 Tab Sze4 WhatsApp Image.-Jpeg


4 )) ENG
ENG A
13-Apr-22 E
C:Users\Abc\ Documents Javaacript 26 March 22 [Link]- Sublime Text (UNREGISTERED) V
File tdit selection ind View Goto lools Project Preferences Help

JavaScript Array1 3 JaveScript [Link] JavaScript [Link] JavaScript 26 March 22 P X OFile | [Link]
1 <!DOCTYPE html> This page says
2 <html> Input Your Radious Value
<head>

<title>Using if Statement</title> RadiousValue


</head>
<body>
OK

<h3>Program for Find Area


if Circle </h3>

<script type="text/javascript"> "


Your Radious Value",
10 var r
=eval(prompt("Input
Radious Value")):
11

12
13
b-3.14"r r;
14
15
alert ("Area of Circle"+ b);

16 </script»
17
18 </body>
19 </html>

Line 19, Column8 TabSize4 WhatsApp image.-Jpeg


A ENG
11:15 AM E
) 13-Apr-22 5
CUsers\Abc\DocumentslJavaacript Do while [Link] Sublime Text (UNREGISTERED)
-

oCeS9x+
File Edit >election Find ViEw Goto 1oos Project Preterences Hep

JavaScript 28 March 22 Switch JavaScript do Table 29 March 22htm Javaacript Do while Stateme C File fle://C/Users/.. *
1 <!DOCTYPE html> OnlineSBI BSNL Web Self Care..
2 <html>
head> Program For Using for Statement

<title> For Staement</title»


</head>
6 body>
Using for Statement</h3>
7

<h3>Program For
8 <script type="text/javascript">
var a-eval (prompt ("Input Any No to Get Table") ) ; 35
10 var i-1;
11 while (i<=10)
12 {
13 [Link](i*a, "<br>") ;
14 i++;
15
16
17 </script»
18 </body>
19 </html>

L i n e 19, Column 8 Tab Size4 WhatsApp [Link]


11:17 AM E
ENG -Apr-22 6)
V
CUsers\Abc\ DocumentsJavaScript do Table 29 March 22. htm -

Sublime Text (UNREGISTERED)


File tdit Selection ind ViEw Goto lools Project Preferences Help

Javascnpt 25 Javascript 25 March 22 Switch Case [Link] Javaacript do Tabie 29 March C O File | [Link]
1 <!DoCTYPE html> OnlineSBI BSNL Web Self Care..
2 <html>
<head> Programming For Using Do While Statement
<title>For Ststement</title>
</head>
6 <body>
78 <h3>Programming
script type="text/javascript">
For Using Do While Statement</h3>

//van a =
eval(prompt ("Input Any No Here to Get
7
Table")
10 var 1-1; 9
10

12 do
13
14 document .write(i, "<br>");
15 it+;
16
1/
18 while(i=10) ;
19
20 </script»
21

22 </body>
23 </html>

L i n e 23, Column 8 Tab Sze WhatsApp [Link]


4) ENG E
Apr-22 6)
CUsers Abc DocumentslJavaScript 28 March 22 Switch Case Statement1 .htm -

Sublime Text (UNREGISTE..

File Edit >election Find ViEw Goto 1oos Project Preterences Heip

ile | [Link]
Javascript [Link] Javascript 26 March 22 Piehtm Javaacript 28 March 22 Switch Case Statement
<h3>Switch Case Statement in java Script</h3> This page says
8
<script type="text/javascript ">
9var day-eval (prompt ("Please Input Any Number to Get
Today is Monday

Day of Week") ) ;
10
11 switch (day)
12
13
14
case 1:alert ("Today is Monday");
break;
15 case 2:alert("Today is Tuesday")
16
reak;
17
18
case
break
3:alert ("Today is Wednesday") :
19
20
case 4:alert ("Today is Thursday") ;
breaks
21 case 5:alert("Today is Friday")
22 break;
25 case 6:alert ("Today is Saturday");
24
break;
25
case 7:alert ("Today is Sunday");
26
break;
27
default:alert ("This is Wrong Entry");
28
29 </script>
30 </body>
31 </html>
L i n e 16, Column 11 Tab Sze4 WhatsApp [Link]
11:16 AM E
a
4) ENG
13-Apr-22 5
CUsers \Abc\ Documents\Javaacript 28 March 22 Switch Case [Link] -

Sublime Text (UNREGISTE.. V


File Edit Selection Find ViEw Goto lools Project Preferences Heip

JavaScript [Link] JavasScript 26 March 22 Piehtm x


Javascript 28 March 22 Switch CaseStatement X OFile | [Link]
1 <!DOCTYPE html> This page says
2 <html> Today is Monday
<head>

<title>JavaScript</title>
</head>
<body
7 <h3>Switch Case Statement in java Script«/h3>
89var
<script type="text/javascript"
day-eval (prompt ("Please Input Any Number to Get
Day of Week"));
10
11 switch (day)
12
13

14
case 1:alert ("Today is Monday");
break;
15
case2:alert("Today is Tuesday");
16 break;
17
18
case 3:alert ("Today is Wednesday") ;
break;
19
case 4:alert ("Today is Thursday ");
28 break
is
21
case 5:alert ("Today Friday") ;
22 break;
23
case 6:alert("Today is Saturday");
24
break;
26
case 7:alert ("Today is Sunday"):
Dreak
L i n e 16, Column 11 TabSize WhatsApp [Link]^
:16 AM
P A ) ENG
13-Apr-22 6
C:Users\Abc\ Documents Javaacript while [Link] -

Sublime Text (UNREGISTERED)


File Edit Selection Find ViEw goto lools Project Preferences Heip
x +
C O File | [Link] É
lavaScript do Table 29 March [Link] JavaScript Do wihile Statementhtm JavaScript while Stateme
1 <!DOCTYPE html> OnlineSBI BSNL Web Self Care..
2 <html>
<head> Program For Using for Statement

</head>
<title>For Staement</title»
6 body>
7 <h3>Program For Using for Statement</h3>
8 script type="text/javascript">

10
var
a-eval (prompt ("Input
var i-1;
Any No to Get Table") ); 35

11 while (i<=10)
12 {
13 [Link] (i"a, "<br>");
14 it+;
15
16
17 </script>
18 </body>
19 /html>

Line 19, Column8 Tab Size 4 WhatsApp [Link]


11:17 AM
4) ENG -Apr-22
CUsers Abc\ Documents JavaScript Multipal if Sturcture1 26 March [Link] - Sublime Text (UNREGISTERED)

File tdit Selection ind ViEw Goto lools Project Preferences Heip oee eeeex+
Jave Javaseript Switc Case Statement 26 March 22htm JavaScript Multipal if Sturcture1 26 March [Link] X OFile [Link]
1 <!DOCTYPE html>
This page says
2 <html> Today is Friday
<head>

<title>Variable</title>
</head>
<body>

<h3>Program For Using Multipal if Statement in


JavaScript</h3>
8 script type="text/javascript">
9

10 var a=eval (prompt ("input Any Between 1 to 7 ", "Input


No"));
11
12 if(a-=1)
13
14 {
15 alert ("Today is Monday ");
16
17 else if( a==2)
18
19
20
alert("Today is Tuesday ");
21
22 else if( a=-3)
23
24 alert ("Today is Wednesday ");
25
L i n e 15, Column 18 Tab Size4
WhatsAPp Image-Jpeg
a ) 11:20 AM 6
ENO13-Apr-22
CUsers\Abc\ Documents JavaScript Multipal if Sturcturel 26 March [Link]- Sublime Text (UNREGISTERED)
File Edit Selection Find ViEw Goto 1oos Project Preterences Hep ooeeeee x+
aveJaveSrpSwiteCase Stotement 26 March [Link] JavaScript Mulitipal if Sturcture1 26 March [Link] XO
File file//c/Users/A..
This page says
24 alert("Today is Wednesday ") Today is Friday
25
26

27
28
else if(a-=4)
29 alert ("Today is Thursday ");
30
31 else if(a=-5)
32 {
33
34
alert("Today is Friday ");

35
36
else if(a==6)
37 alert("Today is Saturday ");
38

39 else if(a==7)
48
41 alert ("Today is Sunday ");
42
43 eise
44
45 alert ("Please Input No Between 1 to 7");
46
47
48 </script>
49 </ body> WhatsAPp [Link]
L i n e 15, Column 18 Tab Sze4

4 )) ENG A
ENG13-Apr-22 )E
C:Users\Abc\ Documents Javaacript 28 March If [Link]-Sublime Text (UNREGISTERED)
File tdit Selection Find ViEw Goto lools Project Preferences Help V v F Ix +

Javaacript for Statementi. javascript while Table 29 March 22htm JavaScript 25 March If [Link] X O File [Link]
1 <!DOCTYPE html>
This page says
2 <html>
Hello [Link]
<head>

<title>If Statment</title>
</head>
6 7
body>
<script type="text/javascript">

var name
prompt ("Please Input Your Name: ")5
9 var gender prompt("Please Write Your Gender""
Male/Female");
16
11
if (gender = "Male")
12
13
14 alert("Hello Mr." +name)
15
16 else
17
L8 alert("Hello Miss." +name):
19

20 </script>
21 </body>
22 </html>

Line 20, Column 10 Tab Sze4 WhatsApp image...Jpeg


11:19 AM
A
) ENG
13-Apr-22 6
CUserslAbc\DocumentslJavaacript for Statement for Create Table. htm- Sublime Text (UNREGISTERED)

File Edit Selection Find ViEw Goto lools Project Preferences Help

C O File [Link] 1
JavaScript Do while Stater Javaacript wehilie [Link] x JavaScript for Statement for CreateTa
1 <!DOCTYPE html> OnlineSBl BSNL Web Self Care.

2 <html>
<head> Program For Using for Statement

</head>
<title>For Staement</title» Sxl = 5

Sx2 = 10

6 body> = 15

7 <h3>Program For Using for Statement</h3> =

Sx5 = 25
20

8 <script a=eval
type="text/javascript"> Sx6 30
(prompt ("Input Any
var No to Get Table") Sx7 =35
18 Sx8
40
Sx9 = 45
11
12
for(i-1; ic=10;i++) 5x10 5 50

[Link](a, "x"., i,
"
13 =
",i*a, "<br>");
14
15
16

17 </script»
18 </body>
19 </html>

Line 1, Column1 Tab Size4 WhatsApp [Link]


11:17 AM E
) ENG 13-Apr-22 6
CUsers Abc DocumentsiJavaScript [Link]- Sublime Text (UNREGISTERED)
File Edit Selection Find View Goto lools Project Preferences Help

JavaScript Multipal if Sturcturet 26 Mar JavaScript if Sturcturet 26 March [Link] Javascript [Link]
C File [Link]
1 <!DOCTYPE html>
OnlineSBl BSNL Web Self Care.
2 <html>
<head>
4
<title>Variable Delcaration</title> Program For Using Varia
</head>
6 body> Prompt Box
7
<script type="text/javascript ">
8 document. write(" <h1>Program For Using Variable Value of A is = 2

with Prompt Box </h1> ") Value of B is = 5


Sum of A and B is = 7

10 var
a
b
=parseInt (prompt("Input Any No
Please"));
11
12
var

C
=parseInt (prompt("Input
a-b;
Any No Please") );
13
14/*var a eval (prompt ("Input Any No Please") );
15 var b = eval(prompt("Input Any No Please"));
16 C = a+b; */
17
"+
18 [Link]("Value of A is =
a+"<br>");
of B is
19
[Link]("Value of A and B is
="+ b:"<br>");
20
[Link] ("Sum =
"* c);
21
22 </script»
23 </body>
24 </html>

Tab Sze
Line 23, Column 8 WhatsApD [Link]
AM
4) ENG
-Apr-22
SCUsers\Abc\ DocumentslJavaScript if Sturcture1 26 March [Link]- Sublime Text (UNREGISTERED)
File Edit Selection ind ViEw Goto lools Project Preferences Help

JavaScrigt SW Javascript Multipal rSturcture1 26 March [Link] x JavaScript if Sturcture1 26 March [Link]
oTeeeeeeeeex+
X OFile [Link]
1 <!DOCTYPE html>
2 <html> This page says
head>
input Your Age
4 title>Variable</title>
</head> Votter Age
<body>
<h3>Prognam For Using i f Statement in JavaScript</
O
h3>
8 script type="text/javascript">
9
10 var a=eval (prompt ("input Your Age " "Votter Age")) ;

12 if(a>=18)
13
14 1
15
16 }
alert("You Are Eligible For Votting ");
17
18 else
19
20
21
alert("You Are Not Eligible For Votting : ");

22 /script>
23 </body>
24 </html>

Tab Size4
Line 22,Column 1 WhatsAp0 ImaeelpEe
) ENG E
Apr-22 6
0sesADCUOCumentsuavacnpt i Api [Link] Suc
-

File Edit Selection Find View Goto Tools Project Preferences Help
Whats New TeJav X

C O File file:/IIC:/Users/Ab.
[Link] [Link] XniCetm

1 <!DOCTYPE html> This page says


<html>
Hello World
head>

title> Java Script Event</title P OK

E
6 <script type="text/javascript">
function hello() Click Me
3
Sarthak Computer Acadewmy Shujalpur Mandi
alert("Hello World");
10

11 /script>
12 </head>
13 <body onkeydown="hello() ">
14 h1>Program for Using onmouseout
Events</h1>
15 cbutton onclick="hello() ">click Me</
button>
16 <p onmouseout="hello() ">Sarthak
Computer Acadewmy Shujalpur Mandi </

17 </body>
18 </html>

Line 18, Column 8 Tab Size: 4 HTML

) 18AM
13-Apr-22
Wh Ne x Jav+
File Edit Selection Find View Goto Tools Project Preferences Help

Javascript ancick Javascript [Link] JavaScript [Link]


C O File file:/IIC:/Users/Ab..
» Other bookmarks
1 !DOCTYPE html> OnlineSBlI BSNL Web Self Care.
2 <html>
Cick The Button to Display The Date
<head
title>Onclick Event </title» The Time is

5 </head> Wed Apr 13 2022 09:19:36 GMT-0530 (India Standard Time)


6 <body>
<p>click The Button to Display
The Date </p>

9
button onclick="displayDate()">The
Time is </button>
10
11
12 <script type="text/javascript">
13 function disp
14
15 [Link] ("
16
demo").innerHTML=Date ();
17 </script>
18 <p id="demo"></p>
19 </body>
20 </html>

L i n e18,Column 18 Tab Size: 4 HTML

) 13-Apr-22
Users\AbC\DOCumentsuavaacrnpt [Link]- Sublime le
Wh 9 Ne | On X +
File Edit Selection Find View Goto Tools Project Preferences Help

Javascript [Link] JavaScript [Link]


C OFile [Link]
S » Other bookmarks
1 <!DoCTYPE html> OnlineSBlI BSNL Web Self
Care.
2 <html>
3 <head> Chck The Button to Display The Date
+
title>Onclick Event </title» TH
The Time is
5 </head>
b <body> Wed Apr 13 2022 09:28:12 GMT-0530 (India Standard Time)
p>Click The Button to Display
The Date </p>

9buttononclick="displayDate()">The
Time is </button>
18
11
12 <script type="text/javascript">
13 function disp yDate ()
14
15 [Link] ("
16
demo"). innerHTML=Date();
17 </script>
18
<p id="demo"></p»
19 </body>
20 </html>

Line 10, Column 1 Tab Size: 4 HTML

¥28H
) 13-Apr-22

You might also like