--- title: targetElement slug: Web/API/SVGAnimationElement/targetElement translation_of: Web/API/SVGAnimationElement/targetElement ---
SVGAnimationElement.targetElement
属性是指完成动画的元素。如果没有目标元素在执行动画(例如:因为 {{SVGAttr("href")}}属性指定了一个未知的元素 ),这个值将返回null
。
var targetElement = someElement.targetElement;
技术规范 | 状态 | 注释 |
{{SpecName("SVG Animations 2", "#__svg__SVGAnimationElement__targetElement", "SVGAnimationElement.targetElement")}} | {{Spec2("SVG Animations 2")}} |
添加 |
{{SpecName("SVG1.1", "animate.html#__svg__SVGAnimationElement__targetElement", "SVGAnimationElement.targetElement")}} | {{Spec2("SVG1.1")}} | 初始定义 |
{{Compat("api.SVGAnimationElement.targetElement")}}