Some sites erroneously indicate that IE will only return the value of certain element attributes if the property form is used (e.g. element.className
instead of element.getAttribute("class")
); as of IE8 this no longer seems to be necessary.
However, other sites point out that the current value of some attributes in the DOM (e.g. input.value
and input.checked
) may indicate the original document value and not reflect its current object property value.
If I'm wanting to synchronize the current state of a HTML document with some arbitrary DOM tree, is there a list of properties that must be accessed in element[propertyName]
form rather than their element.getAttribute(attributeName)
form in order to get and set the current value?