This is an experimental technology
Because this technology's specification has not stabilized, check the compatibility table for usage in various browsers. Also note that the syntax and behavior of an experimental technology is subject to change in future versions of browsers as the specification changes.
The SVGAElement
interface provides access to the properties of <a>
element, as well as methods to manipulate them.
This interface also implements the following interfaces: SVGElement
, SVGURIReference
, SVGTests
, SVGLangSpace
, SVGExternalResourcesRequired
, SVGStylable
, SVGTransformable
.
The interface provides the following properties:
SVGAElement.target
Read only
target
on the given <a>
element.The SVGAElement
interface does not implement any specific methods.
In the example below, the target
attribute of <a>
element is set to _blank and when the link is clicked, it alerts to notify whether the if condition is met or not.
var linkRef = document.querySelector('a'); linkRef.target ='_self'; linkRef.onclick = function(){ if (linkRef.target == '_blank') { alert("BLANK !"); linkRef.target = '_self'; } else alert("SORRY! not _blank"); }
Specification | Status | Comment |
Scalable Vector Graphics (SVG) 1.1 (Second Edition) The definition of 'SVGAltGlyphElement' in that specification. | Recommendation |
Feature | Chrome | Edge | Firefox (Gecko) | Internet Explorer | Opera | Safari (WebKit) |
---|---|---|---|---|---|---|
Basic support | (Yes) | (Yes) | (Yes) | 9.0 | (Yes) | (Yes) |
Feature | Android | Edge | Firefox Mobile (Gecko) | IE Mobile | Opera Mobile | Safari Mobile |
---|---|---|---|---|---|---|
Basic support | ? | (Yes) | (Yes) | ? | (Yes) | (Yes) |
<a>
Element
© 2005–2017 Mozilla Developer Network and individual contributors.
Licensed under the Creative Commons Attribution-ShareAlike License v2.5 or later.
https://developer.mozilla.org/en-US/docs/Web/API/SVGAElement