How can I catch a click event objects attribute using javascript only?
<p>I have the following coded using jQuery:</p>

<pre><code>$('.status-infos').click( function (e) {
    var xx = $(this).attr('data-xx');
    alert(xx);
    return false;
  });
</code></pre>

<p>Our site main page will no longer use jQuery and so I need to do something similar to this using only javascript.  </p>

<p>I saw this as a way to get the click event:</p>

<pre><code>document.getElementById('element').onclick = function(e){
  alert('click');
}
</code></pre>

<p>but how can I get the xx attribute. </p>
