Javascript 如何获取对象类型SVGComponentTransferFunctionElement
我试图获取一个类型为SVGComponentTransferFunctionElement的对象。 有人能给我举个例子(html),其中返回(创建)的输出是SVGComponentTransferFunctionElement类型的吗 有关此类型的详细信息: 试试这段代码Javascript 如何获取对象类型SVGComponentTransferFunctionElement,javascript,svg,Javascript,Svg,我试图获取一个类型为SVGComponentTransferFunctionElement的对象。 有人能给我举个例子(html),其中返回(创建)的输出是SVGComponentTransferFunctionElement类型的吗 有关此类型的详细信息: 试试这段代码 var el = document.createElementNS("http://www.w3.org/2000/svg", "feFuncR"); alert(el instanceof SVGComponentTrans
var el = document.createElementNS("http://www.w3.org/2000/svg", "feFuncR");
alert(el instanceof SVGComponentTransferFunctionElement);
因此,el实现了SVGComponentTransferFunctionElement接口。很有趣。所以基本上我可以使用feFuncA、B、G和R类型的任何元素来应用它的svgcomponentTransferFunction元素属性。解决,我的问题。谢谢