-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathUnit 9 Problem 1.html
45 lines (39 loc) · 1.11 KB
/
Unit 9 Problem 1.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
33
34
35
36
37
38
39
40
41
42
43
44
45
<!DOCTYPE html>
<html>
<head>
<title>Unit 9 Problem 1</title>
</head>
<body>
<p>
<span>
<strong>We</strong>
have just started
<strong>this</strong>
section for the users (
<strong>beginner</strong>
to intermediate) who want to work with
<strong>various</strong>
JavaScript
<strong>problems</strong>
and write scripts online to
<strong>test</strong>
their JavaScript
<strong>skill</strong>
</span>
</p>
<script>
var boldItems = document.getElementsByTagName('strong');
var i;
function highlight() {
this.style.color = "red";
}
function unhighlight() {
this.style.color = "";
}
for (i=0; i<boldItems.length; i++) {
boldItems[i].addEventListener('mouseover', highlight, false);
boldItems[i].addEventListener('mouseout', unhighlight, false);
}
</script>
</body>
</html>