O'Reilly logo
  • Ahmed Elgendy thinks this is interesting:

More fun with attributes! (you can GET attributes too)

Need to know the value of an attribute in an element? No problem, we have a getAttribute method that you can call to get the value of an HTML ...

From

Cover of Head First JavaScript Programming

Note

How to get an attribute of an element?