I have multiple html elements with same class name i want to know which element clicked in pure javascript
<a href="#" data-wow="1" class="wow">link a</a>
<a href="#" data-wow="2" class="wow">link a</a>
<a href="#" data-wow="3" class="wow">link a</a>
in javascript i tried a lot of solutions but all i found working with one element only
what i wrote so far
var dd = document.getElementsByClassName('messages-email');
dd.onclick() = function(ee){
// if i clicked the first link i want to get data-wow which is 1
// and if i clicked the third one i wanna get data-wow which is 3
console.log('i want the clicked elemet attribute ')
}