한 div에서 다른 div로 svg를 이동하려고합니다. This stack question 내가 시도한이 솔루션을 제공했습니다. I이 시도되면 한 div에서 다른 div로 svg를 이동하려고 할 때 계층 구조 요청 오류가 발생합니다.
document.getElementById("LightBoxDiv").appendChild(svgId+"V");
var lightboxdiv = document.createElement('div');
lightboxdiv.id = "LightBoxDiv";
document.body.appendChild(lightboxdiv);
document.getElementById("LightBoxDiv").style.display="block";
document.getElementById("LightBoxDiv").style.position="fixed";
document.getElementById("LightBoxDiv").style.overflow="hidden";
document.getElementById("LightBoxDiv").style.padding="5%";
document.getElementById("LightBoxDiv").style.top=0;
document.getElementById("LightBoxDiv").style.left=0;
document.getElementById("LightBoxDiv").style.width="100%";
document.getElementById("LightBoxDiv").style.height="100%";
document.getElementById("LightBoxDiv").style.background="white";
document.getElementById("LightBoxDiv").style.zIndex="1001";
document.getElementById("LightBoxDiv").setAttribute("class","dotouch");
document.getElementById("LightBoxDiv").appendChild(svgId+"V");
마지막 줄에 오류가있는 줄이 있습니다. 어떤 오류가 발생했는지 알기나 해? 어떻게 고칠 수 있을까요? 당신은 표준 DOM API를 사용하여 jQuery 코드를 혼합하고
내가 그 봤어야 작동 할 것이라는 점을 생각한다. 이것은 완벽하게 작동합니다. –