-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
89 lines (62 loc) · 2.36 KB
/
index.html
File metadata and controls
89 lines (62 loc) · 2.36 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
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
<!DOCTYPE html>
<html>
<head>
<title>JavaScript Programming</title>
<link rel="stylesheet" type="text/css" href="index.css">
<script>
function myHead1() {
document.getElementById("f16").innerHTML = "Paragraph changed.";
}
</script>
</head>
<body>
<!--<h2>My First Web Page</h2>-->
<!--<p id="id1">JavaScript Console.log</p>-->
<!--<p id="f1">JavaScript Math Programming</p>-->
<!--<p id="id3"></p>-->
<!--<p id="id4">JavaScript Date Programming</p>-->
<!--<p id="id5"><br /></p>-->
<!--<ul>
<ol id="r1">Result 1 </ol>
<ol id="r2">Result 2 </ol>
<ol id="r3">Result 3 </ol>
<ol id="r4">Result 4 </ol>
<ol id="r5">Result 5 </ol>
<ol id="r6">Result 6 </ol>
</ul>-->
<!--<h2>My First JavaScript Date</h2>
<button type="button">
Click me to display Date and Time.</button>
<p id="f8"></p>
<h2>What Can JavaScript Do?</h2>
<p id="f9">JavaScript can change HTML content.</p>
<button type="button">Click Me!</button>
<h2>What Can JavaScript Do?</h2>
<p>JavaScript can change HTML attribute values.</p>
<p>In this case JavaScript changes the value of the src (source) attribute of an image.</p>
<button onclick="document.getElementById('myImage').src='img/pic_bulbon.gif'">Turn on the light</button>
<img id="myImage" src="img/pic_bulboff.gif" style="width:100px">
<button onclick="document.getElementById('myImage').src='img/pic_bulboff.gif'">Turn off the light</button>
<h2>What Can JavaScript Do?</h2>
<p id="f10">JavaScript can change the style of an HTML element.</p>
<button type="button" onclick="document.getElementById('f10').style.fontSize='35px'">Click Me!</button>
<h2>What Can JavaScript Do?</h2>
<p id="f11">JavaScript can hide HTML elements.</p>
<button type="button" onclick="document.getElementById('f11').style.display='none'">Click Me!</button>
<h2>What Can JavaScript Do?</h2>
<p>JavaScript can show hidden HTML elements.</p>
<p id="f12" style="display:none">Hello JavaScript!</p>
<button type="button" onclick="document.getElementById('f12').style.display='block'">Click Me!</button>
<h2>JavaScript in Body</h2>
<p id="f13"></p>
<h1>JavaScript Head Programming</h1>
<p id="f16">A Paragraph</p>
<button type="button" onclick="myHead1()">Try it</button> -->
<!--Body Insert -->
<!--<h2>JavaScript in Body</h2>
<p id="f15">A Paragraph.</p>-->
<!--Parangraph change-->
<!--<button type="button" >Try it</button>-->
<script src="index.js" defer></script>
</body>
</html>