Source Code:
(back to article)
Submit
Result:
Report an issue
9
1
2
3
4
5
6
7
›
⌄
⌄
<
p
id=
"mouseoverText"
>Hover over me!</
p
>
<
script
>
document.getElementById(
"mouseoverText"
).addEventListener(
"mouseover"
,
function
() {
this
.style.color =
"red"
;
});
</
script
>
<p id="mouseoverText">Hover over me!</p> <script> document.getElementById("mouseoverText").addEventListener("mouseover", function () { this.style.color = "red"; }); </script>