Sommario
Restituisce un valore booleano: true se l'elemento ha un qualunque numero di attributi, altrimenti false.
Sintassi
bool = element.hasAttributes()
Esempio
t1 = document.getElementById("tabella-dati");
if (t1.hasAttributes()) {
// fai qualcosa con
// t1.attributes
}