var svgDoc = document.getElementById("svgid").getSVGDocument();
var svgRoot = svgDoc.getElementById(id);
svgRoot.setAttribute("style",'fill:#ff0000;cursor:pointer');
svgRoot.removeAttribute("onclick");
svgRoot.addEventListener("click", function () {alert('abc');}
var svgtitle=svgDoc.createElementNS('http://www.w3.org/2000/svg', 'title');
svgtitle.setAttribute('id','123');
svgtitle.textContent='abc';
本站仅提供存储服务,所有内容均由用户发布,如发现有害或侵权内容,请
点击举报。