StyleSheet.ownerNode
OwnerNode renvoie le noeud qui associe cette feuille de style au document.
Syntaxe
js
objref = stylesheet.ownerNode;
Exemple
html
<html>
<head>
<link rel="stylesheet" href="example.css" type="text/css" />
<script>
function stilo() {
alert(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