Detecting classname of SVGAnimatedString

前端 未结 2 1322
生来不讨喜
生来不讨喜 2021-02-18 16:12

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) {
               


        
2条回答
  •  借酒劲吻你
    2021-02-18 16:52

    Make sure you also set the class name inside the svg path tags and then try e.target.getAttribute("class")

    That worked for me.

提交回复
热议问题