--- title: stylesheet.href slug: Web/API/Stylesheet/href tags: - DOM - Dokumentacja_Gecko_DOM - Gecko - Wszystkie_kategorie translation_of: Web/API/StyleSheet/href --- <p>{{ ApiRef() }}</p> <h3 id="Podsumowanie" name="Podsumowanie">Podsumowanie</h3> <p>Zwraca położenie zewnetrznego arkusza stylów.</p> <h3 id="Sk.C5.82adnia" name="Sk.C5.82adnia">Składnia</h3> <pre class="eval"><i>uri</i> = stylesheet.href </pre> <h3 id="Parametry" name="Parametry">Parametry</h3> <ul> <li><code>uri</code> jest łańcuchem zawierającym URI arkusza stylów.</li> </ul> <h3 id="Przyk.C5.82ad" name="Przyk.C5.82ad">Przykład</h3> <pre> // W lokalnej maszynie: <html> <head> <link rel="StyleSheet" href="example.css" type="text/css" /> <script> function sref() { alert(document.styleSheets[0].href); } </script> </head> <body> <div class="thunder">Thunder</div> <button onclick="sref()">ss</button> </body> </html> // Zwraca "file:////C:/Windows/Desktop/example.css </pre> <h3 id="Notatki" name="Notatki">Notatki</h3> <p>Jeżeli arkusz stylów jest zewnętrznym arkuszem stylów, wartością tego atrybutu jest jego lokalizacja. Dla wewnętrznego arkusza stylów, wartość tego atrybutu wynosi null.</p> <h3 id="Specyfikacja" name="Specyfikacja">Specyfikacja</h3> <p><a class="external" href="http://www.w3.org/TR/2000/REC-DOM-Level-2-Style-20001113/stylesheets.html#StyleSheets-StyleSheet-href">href </a></p>