我正在尝试切换“d”值并将其替换为动态生成的数字,但我不断收到“意外数字”作为我的输出。这是我目前拥有的:
<path id="pathA" d="M 0 0 l 0 255" stroke="none" stroke-width="0" fill="none"/>
<script>
var sink = document.getElementById("pathA");
sink.setAttribute("d", M 0 0 l 0 (round*25.5));
</script>
我正在尝试切换“d”值并将其替换为动态生成的数字,但我不断收到“意外数字”作为我的输出。这是我目前拥有的:
<path id="pathA" d="M 0 0 l 0 255" stroke="none" stroke-width="0" fill="none"/>
<script>
var sink = document.getElementById("pathA");
sink.setAttribute("d", M 0 0 l 0 (round*25.5));
</script>