- Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmouse-out-mouse-over.html
More file actions
Latest commit
48 lines (45 loc) · 1.47 KB
/
Copy pathmouse-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>
<htmllang="en" xmlns="http://www.w3.org/1999/xhtml">
<head>
<metacharset="utf-8" />
<title>Mouse Out and Over event</title>
<styletype="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>
<scripttype="text/javascript">
functionrollOn(){
if(window.event.srcElement.className=="outClass"){
window.event.srcElement.className="overClass"
}
}
functionrollOff(){
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>
<spanclass="outClass">Home </span>
<spanclass="outClass">products </span>
<spanclass="outClass">Downloads </span>
<spanclass="outClass">About Us </span>
<spanclass="outClass">Contact </span>
</p>
</body>
</html>