Im trying to display the attribute value of circle but its not working.
My Script
var x = document.getElementById("circle").getAttribute("cx");
document.write(x);
My HTML
<svg width="1000" height="500">
<circle id="circle" cx="50" cy="50" r="50">
</svg>