I want to make a js class selector like in jquery.
$('.someClass').click(function(){
alert($(this).value());
});
I have tried in javascript .
function myFunction(this){
alert(this).value;
}
document.getElementsByClassName('someClass').onclick = "myFunction";
this isnt working for me and I have also refered to many other forums in stack overflow.
THIS IS NOT DUPLICATE ... IF YOU FIND IT PLEASE HELP ME WITH THE LINK