svg circle not being drawn with javascript

后端 未结 1 2025
鱼传尺愫
鱼传尺愫 2021-02-14 13:54

I have been trying to do a hello world for svg manipulation using javascript in HTML. I have written the below code and although it generates the correct html, I don\'t see any

1条回答
  •  慢半拍i
    慢半拍i (楼主)
    2021-02-14 14:49

    SVG elements need to be created with the SVG XML namespace. You can do that using createElementNS and using the http://www.w3.org/2000/svg namespace:

    
    
    
    
    
    
    
    
    

    0 讨论(0)
提交回复
热议问题