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

KISS, DRY, SOLID, YAGNI — A Simple Guide to Some Principles of Software Engineering and Clean Code

1 — KISS (Keep It Simple, Stupid)  Simplicity triumphs over complexity. Direct and clear codes are better for developing, maintaining, and s...