-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmouse-out-mouse-over.html
More file actions
48 lines (45 loc) · 1.47 KB
/
mouse-out-mouse-over.html
File metadata and controls
48 lines (45 loc) · 1.47 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
<!DOCTYPE html>
<html lang="en" xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta charset="utf-8" />
<title>Mouse Out and Over event</title>
<style type="text/css">
.outClass {
font-family: 'Franklin Gothic Medium', 'Arial Narrow', Arial, sans-serif;
font-size:12px;
color:#fff;
background-color:#00f;
}
.overClass {
font-family: 'Franklin Gothic Medium', 'Arial Narrow', Arial, sans-serif;
font-size:12px;
color:#00f;
background-color:#fff;
}
</style>
<script type="text/javascript">
function rollOn() {
if (window.event.srcElement.className == "outClass") {
window.event.srcElement.className = "overClass"
}
}
function rollOff() {
if (window.event.srcElement.className == "overClass") {
window.event.srcElement.className = "outClass"
}
}
//object_name.event_name = event_handler
document.onmouseover = rollOn;
document.onmouseout = rollOff;
</script>
</head>
<body>
<p>
<span class="outClass">Home </span>
<span class="outClass">products </span>
<span class="outClass">Downloads </span>
<span class="outClass">About Us </span>
<span class="outClass">Contact </span>
</p>
</body>
</html>