JavaScript: Registrering mouse event over a div element
<p>My first start into JavaScript.
I can make mouseover events trigger changes when I use it with images, but not with a div only containing text. What am I doing wrong ? Code follows.</p>

<pre><code>&lt;html&gt;
    &lt;head&gt;
      &lt;script language="javascript" type="text/javascript"&gt;
        function addHeading(node, text) {
          var newNode=document.createElement("h1");
          var text=document.createTextNode(text);
          newNode.appendChild(text);
          node.appendChild(newNode);
        }
      &lt;/script&gt;
    &lt;/head&gt;

    &lt;body&gt;
      &lt;div onmouseover="addHeading(document.body, "Header added")"&gt;
      Hola!
      &lt;/div&gt;
    &lt;/body&gt;
&lt;/html&gt;
</code></pre>
