jweinst1
9/28/2015 - 9:31 PM

basic mouse over mouse out events in javascript HTML

basic mouse over mouse out events in javascript HTML

<!DOCTYPE html>
<html>
<body>

<h1 onmouseover="mouse_here()" onmouseout="mouse_gone()" id="target">Hiding</h1>

<script>
function mouse_here() {
    document.getElementById("target").innerHTML = "Peekaboo";
}
function mouse_gone() {
    document.getElementById("target").innerHTML = "Hiding";
}
</script>

</body>
</html>