SyntaxFix
Write A Post
Hire A Developer
Questions
Using the onMouseLeave event prevents bubbling and allows you to easily detect when the mouse leaves the browser window.
<html onmouseleave="alert('You left!')"></html>
http://www.w3schools.com/jsref/event_onmouseleave.asp