-
Notifications
You must be signed in to change notification settings - Fork 213
Expand file tree
/
Copy pathJS-MOUSE-EVENT.HTML
More file actions
46 lines (39 loc) · 835 Bytes
/
JS-MOUSE-EVENT.HTML
File metadata and controls
46 lines (39 loc) · 835 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
34
35
36
37
38
39
40
41
42
43
44
45
46
<html>
<head>
<title></title>
<style>
#firstdiv{
width:30%;
height:50%;
background-color:pink;
border:1px solid blue;
font-size:20px;
}
</style>
<script>
function onMouseoverEffect()
{
var div = document.getElementById("firstdiv");
div.style.Color="blue";
div.style.fontSize="30px";
div.style.backgroundColor="red";
}
function onMouseoutEffect()
{
var div = document.getElementById("firstdiv");
div.style.Color="red";
div.style.fontSize="40px";
div.style.backgroundColor="yellow";
}
function onMouseclickEffect()
{
var div = document.getElementById("firstdiv");
div.style.Color="black";
div.style.fontSize="50px";
div.style.backgroundColor="blue";
}
</script>
</head>
<body>
<div id="firstdiv" onmouseover="onMouseoverEffect()" onmouseout="onMouseoutEffect()" onclick="onMouseclickEffect()">This is a demo divison</div>
</body>