StyleSheet.ownerNode
OwnerNode renvoie le noeud qui associe cette feuille de style au document.
Syntaxe
ObjRef = stylesheet.ownerNode
Exemple
<Html>
<Head>
<Link rel = "StyleSheet" href = "example.css" type = "text / css" />
<Script>
Function stilo () {
Alerte (document.styleSheets [0] .ownerNode);
}
</ Script>
</ Head>
<Body>
<Button onclick = "stilo ()"> ss </ button>
</ Body>
</ Html>
// affiche "objet HTMLLinkElement"
Remarques
Spécification
DOM Styles de niveau 2 - FEUILLE DE STYLES