title: event.target/srcElement not working 100% in Chrome and Opera
body: <p>I'm trying to get the <code>target/srcElement</code> of an HTML <code>"area"</code> element for an image map.</p>
  
  <p>Here's what I have so far (pardon the data URI):</p>
  
  <pre><code>&lt;map name="dpad"&gt;
    &lt;area id="dpad"shape="rect" alt="" title="" coords="1,14,12,24" onmousedown="move('l',false,event);" target="" /&gt;
    &lt;area shape="rect" alt="" title="" coords="15,2,24,12" onmousedown="move('u');" target="" /&gt;
    &lt;area shape="rect" alt="" title="" coords="27,15,38,24" onmousedown="move('r');" target="" /&gt;
    &lt;area shape="rect" alt="" title="" coords="15,27,25,38" onmousedown="move('d');" target=""/&gt;
  &lt;/map&gt;
  &lt;img width="40"height="40"src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACgAAAAoCAYAAACM/rhtAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAgY0hSTQAAeiYAAICEAAD6AAAAgOgAAHUwAADqYAAAOpgAABdwnLpRPAAAABp0RVh0U29mdHdhcmUAUGFpbnQuTkVUIHYzLjUuMTAw9HKhAAADDElEQVRYR+2ZvYoiQRSFW1EMVkEzI2XfydQH2GwGDTfczFRYNNBBUDFQUFN9ATXQwEEDRQ3UB3ADQajpr7Gkp8f+k2G6F2bg0jVVt+qcrp9zb5cBxeVfMpmMnE6nX+fz+U8kEvkRCoUsR7hcLorq+0/1/R2NRv8ej8ezS0h37uFwOBEMBkupVErk83lRKBQsDR986UNfd2gPeAcCgYRqpUwmI+bzuTgcDjcbj8cC09fhgy996PsApLsukmA2mxWLxeJGhnKz2dTMWI+vpwRXq5XodDqi3W5rRpk6ZhKynhLc7XZiMBiIVqsler2eZpSpo81zgqPRSDQaDdHtdkW/39eMMnXsR08JTqdTUSqVRK1WE/V6/Z1RVy6XBT6eLTEzNJlMLA0fzwjqT6teWvRlT5f4myASnU6nI4SgqwA7ef5UfV+MQu1giV/UfvR1gpGAE9wUNYA/EyevSu/kCdDrAwRfeTGnOHCKxWLPipqNnAjmxEtAnVqxWBTr9fpd3L03i/jg63Rc/OACJ7gxg1pWQlBn0+sNDZNia2wDeL/f3wgSNWazmWaUJVl88DX253/GBsPYBhc4wU2Jx+NauqR/ewCIEIgwOme2v6jfbDZiOByKarWqCTZWqVS0UEebVV/GBgMs/UvRB05w+0CQIM/ghCrA7AhCjihCDJahjjJ1tNkRBAMsMGWCYUqQqSYTIdgTTwGxIshbM3N6cnqStG23W1OSjA0GWGCCLbX1wwyyH8jlSJckoB1B9hszIEkZn7ThYzaLkiD9wAQbDnD5/wjylsvl8lOXmMPidonh8GWHhI3/qYdEDsbmZx+Qz9md4nsyw+HgBDuRGTDAMpUZxDCXy5kKNQTviaxRqFlKKdT6ZbUSasY2E2o4aULt+1BHQPZ1suD7dMvdZ7uimH24O8gHvb1Z+CbodKn1Sywvi+yenn12omEIrUyZSJuk+eLDXWbFvr36gKDvL484vb6+fpPy4rsLTN9eAesv0ck47C7R8fnSS3R+hlDToCeV6Il0iE9DK8Pn6vtEX6d6K/3eAH0oKaUOiMCyAAAAAElFTkSuQmCC"usemap="#dpad"/&gt;
  </code></pre>
  
  <p>So, for the left arrow on the dpad, I have a function to be called <code>onmousedown</code>, <code>move(dir,hold,e)</code>.</p>
  
  <p>Here is the function started:</p>
  
  <pre><code>function move(dir,hold,e){
      var p=document.getElementById('test');
      alert(e);
  }
  </code></pre>
  
  <p>This is confusing the crap out of me as to why I'm getting <code>"undefined"</code> when clicking on the area. Could someone please explain in FULL detail as to how I can get the target?</p>
  
  <p>Do I need to include <code>'event'</code> as a parameter in my HTML code? Do I even NEED a parameter for it?</p>
  
  <p>On another note, here's something that really confused me.</p>
  
  <p>So, I can't get the target of that element, but this works just fine:</p>
  
  <pre><code>&lt;div class="male1-d" id="test" data-sprite="male1" onclick="alert(event.target+' '+this.style.left+' '+this.style.top);"&gt;&lt;/div&gt;
  </code></pre>
  
  <h2>Done. Target obtained. Now why can't I do it in a function?</h2>
  
  <p>I forgot to mention that for Opera I meant mobile(?) version 9.50.</p>