<html> <body> <div id="diver"> text </div> <script language="JavaScript"> document.getElementById('diver').onmouseover = function() { alert('fgdfg'); } </script> </body> </html>