| |||||||||||||||||||
srcElement PropertyRetrieves the object that fired the event. Syntax
Possible Values
The property is read-only with no default value. ExampleThe following example retrieves the parent object ( if needed ), creates the text range, moves to the original object, and selects the first word in the object. <script language="JScript">
function selectWord ( ) {
var oSource = window.event.srcElement ;
if ( !oSource.isTextEdit )
oSource = window.event.srcElement.parentTextEdit;
if ( oSource != null ) {
var tRange = oSource.createTextRange ( );
tRange.moveToElementText ( window.event.srcElement );
tRange.collapse ( );
tRange.expand ( "word" );
tRange.select ( );
}
}
</script>
Applies To |
| ||||||||||||||||||
Check out related books at Amazon
© 2000-2008 Rey Nuñez All rights reserved.
If you have any question, comment or suggestion
about this site, please send us a note
You can help support aspxtreme