title: mouse coordinates in javascript?
body: <p>I created a small function to get mouse coordinates in div but somehow it is not working. I checked my function thoroughly but I didn't find the bug.</p>
  
  <pre><code>&lt;html&gt;
      &lt;head&gt;
      &lt;meta http-equiv="Content-Type" content="text/html; charset=UTF-8"&gt;
      &lt;title&gt;&lt;/title&gt;
      &lt;script type="text/javascript"&gt;
      function SetValues()
      {
      var s = "X:" + window.event.clientX + " Y:" + window.event.clientY ;
      document.getElementById('divCoord').innerHTML = s;
      }
      &lt;/script&gt;
      &lt;/head&gt;
      &lt;body onmousemove=SetValues()&gt;
      &lt;div id="divCoord"&gt;&lt;/div&gt;
      &lt;/body&gt;
      &lt;/html&gt;
  </code></pre>