HTMLElement in IE does NOT support hasAttribute(name) because IE does not play with DOM Level 2 methods. So, use getAttribute(name) != null instead of hasAttribute(name).
P.S. Similarly, use attributes.length > 0 instead of hasAttributes().
and she wants to . slow . down
HTMLElement in IE does NOT support hasAttribute(name) because IE does not play with DOM Level 2 methods. So, use getAttribute(name) != null instead of hasAttribute(name).
P.S. Similarly, use attributes.length > 0 instead of hasAttributes().
四月 19, 2009 於 11:35 午後
but life would be even easier to just use jQuery~ : P