This sample uses the clearAttributes method to remove all attributes from an object. Click the View outerHTML button to see the HTML source of the DIV element. When you click the Clear Attributes button, the attributes set on the element are removed and the outerHTML property is displayed. Notice that ID is the only attribute that is not cleared. Click the Reset Attributes button to return the attributes on the element to their original state.
[Right-click and choose View Source from the shortcut menu.]
© 2007 Microsoft Corporation. All rights reserved. Terms of use.