DOM:element.hasAttributes
z Mozilla Developer Center, polskiego centrum programistów Mozilli.
Spis treści |
[edytuj] Podsumowanie
hasAttributes zwraca wartość logiczną zależnie od tego, czy element posiada jakiekolwiek atrybuty.
[edytuj] Składnia
[ true | false ] = element.hasAttributes
[edytuj] Przykład
t1 = document.getElementById("table-data");
if ( t1.hasAttributes ) {
// zrób coś z
// t1.attributes
}