I had a problem with a SVG map I was building, the functions triggered by onmouseover on g were not working. I used then
window.onmouseover=function(e) {
Simplest way:
e.target.className.baseVal
Another way:
e.target.getAttribute("class")
Make sure you also set the class name inside the svg path tags and then try e.target.getAttribute("class")
That worked for me.