I have input in grid, which each unique ID, output as following;
<a href="#" class="SearchUser_Icon Hyperlink_Text" onclick="load_getUserListByGroupID()" id="2"></a>
I want to know what is equivalent to $(this).attr("ID") in javaScript
function load_getUserListByGroupID()
{
var selectedGroupID = document.getElementById('input');
alert(selectedGroupID);
}
this.getAttribute('id')orthis.idgetAttribute. StackOverflow tends to function as a poor substitute for just reading the documentation.addEventListener, that way you'd solve the issue with the inline handler and get access tothis