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

android - Get AccessToken using signpost OAuth without opening a browser (Two legged Oauth) -

org.mockito.exceptions.misusing.InvalidUseOfMatchersException: mockito -

google shop client API returns 400 bad request error while adding an item -