こんにちは私は次のコードを持っています、そして私はボタンを押すことによって円の半径を変更できるようにしたいです私はスタイルの後に何を使うべきかわかりません。document.getElementById( "circle1")。style.r = "10"; コードの一部
<html>
<head>
<script>
function circle() {
document.getElementById("circle").style.r="50";
}
function circle1() {
document.getElementById("circle1").style.r="10";
}
</script>
</head>
<svg xmlns="http://www.w3.org/2000/svg" version="1.1" id="svg" >
<circle id = "circle" cx = "100" cy = "800" r = "30" stroke="blue" stroke-width = "2" fill = "black"/>
<circle id = "circle1" cx = "20" cy = "500" r = "30" stroke="blue" stroke-width = "2" fill = "black"/>
</svg>
<body>
Set size of circles
<input type="button" onclick="circle()" value="big" />
<input type="button" onclick="circle1()" value="small" />
</body>
</html>