--- title: element.hasAttributes slug: Web/API/Element/hasAttributes tags: - DOM - Dokumentacja_Gecko_DOM - Gecko - Wszystkie_kategorie translation_of: Web/API/Element/hasAttributes --- <p>{{ ApiRef() }}</p> <h3 id="Podsumowanie" name="Podsumowanie">Podsumowanie</h3> <p><b>hasAttributes</b> zwraca wartość logiczną zależnie od tego, czy element posiada jakiekolwiek atrybuty.</p> <h3 id="Sk.C5.82adnia" name="Sk.C5.82adnia">Składnia</h3> <pre class="eval">[ true | false ] = element.hasAttributes </pre> <h3 id="Przyk.C5.82ad" name="Przyk.C5.82ad">Przykład</h3> <pre>t1 = document.getElementById("table-data"); if ( t1.hasAttributes ) { // zrób coś z // t1.attributes } </pre> <h3 id="Specyfikacja" name="Specyfikacja">Specyfikacja</h3> <p><a class="external" href="http://www.w3.org/TR/2000/REC-DOM-Level-2-Core-20001113/core.html#ID-NodeHasAttrs">hasAttributes</a></p> <div class="noinclude"> </div> <p>{{ languages( { "en": "en/DOM/element.hasAttributes", "fr": "fr/DOM/element.hasAttributes", "it": "it/DOM/element.hasAttributes" } ) }}</p>