title: How to define function inside onMouseOver and onMouseOut
body: <pre><code>&lt;div align="right" style="border:1 #FF0 solid; background-color:#999" onMouseOver="javascript: function(){this.style.backgroundColor = '#DDD';}" onMouseOut="javascript: function(){this.style.backgroundColor = '#999';}"&gt;
  Register
  &lt;/div&gt;
  </code></pre>
  
  <p>When mouseover event triggered it gives this error:</p>
  
  <blockquote>
    <p>Uncaught SyntaxError: Unexpected
    token (</p>
  </blockquote>
  
  <p>What should I do? I want to define a function inside <code>onMouseOver</code> and <code>onMouseOut</code></p>