Forum Moderators: open
In this case, onmouseover is a property of the document object. This is part of the browser's object model, exposed through javascript. It should be assigned a function reference, that is, the name of a function.
<a onmouseover="myListener()">myLink</a>
In this case, onmouseover is an HTML attribute. All HTML attribute values are strings. So here, you must assign a string to onmouseover, and later this string will be evaluated by the javascript interpreter.
The above expression first calls the function and then assigns the "return value" to variable on the left.
document.onmouseover = myListener;
The above expression assigns the value of the variable on the right to the variable on the left. In this case the value of myListener is a "pointer" or reference to the function itself.