-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathhead_js.html
More file actions
33 lines (30 loc) · 977 Bytes
/
Copy pathhead_js.html
File metadata and controls
33 lines (30 loc) · 977 Bytes
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
<!DOCTYPE html>
<html>
<head>
<!-- JavaScript in <head> or <body>
You can place any number of scripts in an HTML document.
Scripts can be placed in the <body>, or in the <head> section of an HTML page, or in both. -->
<title>JavaScript in the Header part</title>
<!--
<script>
function myFunction() {
document.getElementById('demo').innerHTML = 'Paragraph Changed.';
}
</script> -->
</head>
<body>
<h1>A Web Page</h1>
<p id="demo">A Paragraph</p>
<button type="button" onclick="myFunction()">Try it</button>
<!--
<script>
function myFunction() {
document.getElementById('demo').innerHTML = 'Paragraph Changed.';
}
</script> -->
<!-- Placing scripts at the bottom of the <body> element improves the display speed,
because script compilation slows down the display. -->
<!-- adding external js file -->
<script src="myScript.js"></script>
</body>
</html>