Monday, April 23, 2012

getAttribute() versus Element object properties?

Element.getAttribute("id") and returns same thing.

Which one should be used when we need attributes of an HTMLElement object?

Is there any cross browser issue with these methods like getAttribute() and setAttribute()?

Or Any input on performance difference b/w accessing directly properties vs using these methods?

No comments:

Post a Comment