-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathHome.html
40 lines (38 loc) · 913 Bytes
/
Home.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
<html>
<head>
<title>Home Page</title>
</head>
<body>
<h2>Demonstrate mouseOver() and focusFunction()</h2>
<h3
id="demo"
onmouseover="mouseOver()"
onmouseout="onMouseOut()"
style="color: black"
>
Mouse Over Me
</h3>
<input
type="text"
placeholder="Enter Text"
id="focus"
onfocus="focusFunction"
onblur="blurFunction()"
style="background: red"
/>
<script>
function mouseOver() {
document.getElementById("demo").style.color = "Red";
}
function onMouseOut() {
document.getElementById("demo").style.color = "Black";
}
function focusFunction() {
document.getElementById("demo").style.background = "Yellow ";
}
function blurFunction() {
document.getElementById("demo").style.background = "Yellow ";
}
</script>
</body>
</html>