blob: 2e1c7aea737ab172c51c935cab2989c729e9636d (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
|
---
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>
|