forked from itscodenation/flw1-u1l6-23-24-student-exercises
-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
32 lines (27 loc) · 887 Bytes
/
index.html
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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Do Now</title>
</head>
<body>
<div class="navbar">
<a href="index.html">Do Now</a>
<a href="querySelector.html">querySelector</a>
<a href="inner.html">innerHTML</a>
<a href="updateImage.html">Update Images</a>
</div>
<p>I am unchanged</p>
<!-- 1. Add an onclick attribute and set the value to the changeText function. -->
<!-- 2. Run the code and test to see if everything works 👍 -->
<button>Click to Change Text</button>
<!-- DO NOT CHANGE THE CODE BELOW -->
<!-- script tag that contains changeText function -->
<script>
function changeText() {
document.querySelector("p").innerHTML = "I have been changed!";
}
</script>
</body>
</html>