javascript - Can set id but can't set the class to svg -


i have created svg dynamic can't set class name svg.

var circle = document.createelementns( 'http://www.w3.org/2000/svg', 'circle'); circle.setattribute("cx", 6); circle.setattribute("cy", 6); circle.setattribute("r", 4); circle.setattribute( 'id', 'special'); (this method working),  circle.classname("abc"); **is not working**  

why?

um... because that's not how set class name?

circle.classname = "abc"; 

Comments

Popular posts from this blog

css - I want to align grid in center -

Contact Form PHP Email Script -

python - SWIG function not printing output -