我可以在javascript中使用SVG文本標籤。但它不起作用。這些是我的Javascript代碼。如何在javascript中使用svg文本標籤
O=evt.target;
Doc=O.ownerDocument;
L = Doc.createElementNS(xmlns, "text");
L.setAttribute("x", 10);
L.setAttribute("y", 10);
L.node.textContent("abcdef");
L.setAttribute("fill", "red");
O.appendChild(L);
SVG的文本標籤,例如:
<text x="10" y="10" fill="red">abcdef</text>
什麼在我的javascript代碼類型的錯誤。 問候,VIJI
xmlns是什麼意思? – 2012-08-06 11:46:29
xmlns =「http://www.w3.org/2000/svg」它是我的xmlns。 – Viji 2012-08-06 12:17:32