sourceIndex Property Sample

This sample uses the sourceIndex property to display the ordinal position of an element on the page. When you move the mouse pointer over any part of this page, the onmousemove event handler on the BODY element queries the sourceIndex of the element that fired the event. The element is provided by the srcElement property on the event object, which is created when the onmousemove event fires. The value of the sourceIndex property is used to retrieve the tag names of adjacent elements in the all collection.

Source Index:
Object Name:
Previous Object:
Next Object:



[Right-click and choose View Source from the shortcut menu.]

© 2007 Microsoft Corporation. All rights reserved. Terms of use.