-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDisplay Possibilites.html
More file actions
64 lines (51 loc) · 1.41 KB
/
Display Possibilites.html
File metadata and controls
64 lines (51 loc) · 1.41 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
<!DOCTYPE html>
<html>
<head>
<title> Diaplay Possibility</title>
</head>
<body>
<h1> Display Possibilities </h1>
<p id="demo"></p>
<h3 id="demo1"></h3>
<script>
document.getElementById("demo").innerHTML="Here we discuss about the dispaly possibilities in JS" ;
</script>
<button type="button" onclick='document.getElementById("demo1").innerHTML=("1. innerHTML")'>Click</button>
<!-- By document.write() -->
<script>
document.write (359+459);
</script>
<script>
alert(15+9);
</script>
<script>
console.log(59+69);
</script>
<!-- for print any page we use the window.print() -->
<button onclick="window.print()">print</button>
<h3 id="name"></h3>
<!-- Javascript statements -->
<script>
let x, y, z ;
x = 10;
y = 25;
z = x + y;
document.getElementById("name").innerHTML="The vlaue of z is " + z + ".";
</script>
<h2 id="name2"> </h2>
<!-- Find out the sum of the two numbers -->
<script>
let a = 23;
b = 34;
c = a + b;
document.getElementById("name2").innerHTML= c ;
</script>
<h3 id="name3">
</h3>
<script>
let a, b, c ;
a = 14 ; b = 13; c = a - b;
document.getElementById("name3").innerHTML= c;
</script>
</body>
</html>