<!DOCTYPE html>
<
html
><
head
></
head
><
body
>
<button id="idone">mouse over that</button>
</
body>
</
html
>
<
script
type
="
text/javascript
"> window.addEventListener('load', function() {
function handler(ev) { document.body.className = "warning" } function handler2(ev) { document.body.className = ""; } idone.addEventListener('mouseenter', handler) idone.addEventListener('mouseleave', handler2)
}) </
script
>
<
style
type
="
text/css
">
.warning { background: red; }
</
style
>
RESULT: (open your console with F12 or CTRL-SHIFT-K)