Run ❯
Get your
own
website
Result Size:
625 x 565
×
Change Orientation
Save Code
Change Theme, Dark/Light
Go to Spaces
<!DOCTYPE html> <html> <body> <h2>SVG script Element</h2> <svg width="200" height="120" xmlns="http://www.w3.org/2000/svg"> <circle id="circle3" cx="50" cy="60" r="25" style="fill:red;" /> Sorry, your browser does not support inline SVG. </svg> <input type="button" value="Change Circle" onclick="changeMe()" /> <script> function changeMe() { var c = document.getElementById("circle3"); c.setAttribute("r", "50"); c.setAttribute("cx", "150"); c.style.fill="green"; c.style.stroke="red"; } </script> </body> </html>