I am trying to create a SVG tag structure only when or after page loads.
This request may seem strange but this is needed since most of the html markup is generated
what you are doing is perfectly fine. There are some small flaws in your svg wich prevents it from showing up.
xmlns="http://www.w3.org/2000/svg"
) height
attribute is missing the quotes (height="100"
)
)width="100" height="100"
but cx="400" cy="400"
)var newSvg = document.getElementById('myDiv');
newSvg.outerHTML += '';