Because of different reasons I can NOT use $(\'.class\').click or on(\'click\', function..)
So I really have to use the onclick=\"\" event from the html element.
From jsfiddle you provided, edit your code like below and you'll get answer (class) properly.
CLICK HERE
function someFunction(obj,abc) {
alert(abc);
alert(obj.getAttribute('class'));
}
Pass this as first argument and then access it in function with obj. After that you can use obj.getAttribute('class')