Tuesday 5 April 2022

addEventListerner for window.onload in Javascript

 <!DOCTYPE html>

<html lang="en">

<head>

<metadata tag="UTF-8">

<script>

window.onload = function()

{

let test = document.getElementById("body");

test.addEventListener("mouseout", function(event) {

  // highlight the mouseenter target

  console.log('mouse out'); 

})

}

</script>

</head>


<body id="body">

Online Test mouse out to count for mouse out from screen to prevent user interaction with google

</body>

</html>


No comments:

Post a Comment