To use getAttribute(), or not to use getAttribute(): that is the question [duplicate]
Possible Duplicate: JavaScript setAttribute vs .attribute= javascript dom, how to handle "special properties" as versus attributes? Many times, in forums or places such as Usenet I have been told by some (when criticizing my code) that instead of saying, for example var link = a.href I should use var link = a.getAttribute('href'); instead. And use its complementary setAttribute() when wanting to assign. They say it is the correct way to do it, that I am wrong, blah blah blah... I don’t normally pay any attention to those. And when I ask why nobody gives a real answer. Now I am curious about in