2013/09/06

呼叫SVG裡的javascript method

工作筆記

A.html中用下面的tag包含了一個SVG

在B.svg中有一個JavaScript function: myfunction()

如果要從A.html呼叫B.svg裡的這個function,可以用下面的方法來進行
document.getElementById("svg").getSVGDocument().defaultView.myfunction();

沒有留言: