Visit Mozilla.org

Talk:Core JavaScript 1.5 Reference:Operators:Special Operators:function Operator

From MDC

This operator is useful when assigning onclick() actions to objects through JavaScript. For example:

objref.onclick() = function { doThis(); }

Simply putting doThis() on the right side of the expression will not generate the effect which is intended.