내 코드에 두 개의 원숭이가 있습니다. 첫 번째는 정적인데 (SVG 태그로 작성) 괜찮습니다.하지만 두 번째는 JS로 생성됩니다. 두 태그 모두의 코드는 실행 후에도 동일하지만. 그게 어떻게 가능해? 어떻게 해결할 수 있습니까?<image> SVG : 정적 이미지가 표시되지만 동적이 아닙니다.
<svg version="1.1" xmlns="http://www.w3.org/2000/svg"
xmlns:xlink="http://www.w3.org/1999/xlink">
<image xlink:href="http://6962mnpm.blox.pl/resource/118392wtf.jpg"
height="250px" width="250px" x="100px"></image>
</svg>
<script>
var test = document.createElementNS("http://www.w3.org/2000/svg", "image");
test.setAttribute("xlink:href",
"http://6962mnpm.blox.pl/resource/118392wtf.jpg");
test.setAttribute("height", "250px");
test.setAttribute("width", "250px");
test.setAttribute("x", "400px");
document.querySelector("svg").appendChild(test);
</script>