I am trying to use getAttribute() to get the "for" attribute of a label, but it won't work in IE. Originally, I had used htmlFor and it worked fine in both IE and Firefox. Does anyone know why getAttribute() won't work in IE. W3C has getAttribute as being available in IE as early as IE5.

This is the code snippet inside my onclick event handler:

Code:
this.parentNode.getAttribute('for')