EN
此内容没有您的语言版本,但有英语版本。

oldValue property

Retrieves the previous value of the attribute or characterData that was mutated (or null otherwise)..

This property is read-only.

IE11

 

Syntax

JavaScript
ptr = object.oldValue

 

Property values

Type: DOMString

Remarks

If the MutationRecord is of type attributes, you can use its attributeName property to identify the specific attribute that changed. If you registered (via the MutationObserver.observe method) to collect attributeOldValue data on your target node, the oldValue property provides the original attribute value before it was changed.

If the MutationRecord is of type characterData and you registered (via the MutationObserver.observe method) to collect characterDataOldValue data on your target node, the oldValue property provides the original text data before it was changed.

See also

MutationRecord

 

 

显示:
© 2014 Microsoft