The HTML DOM object model defines an Event
object with a target
property.
Looking at MSDN, Microsoft documents a target
property. They also document srcElement
as an alias of target
from earlier versions of Internet Explorer:
The target property is similar to srcElement in Windows Internet Explorer 8 and earlier versions.
So here i am in Internet Explorer, sitting at a click
breakpoint:
<div class="day" onclick="divClick(this)">
function divClick(sender)
{
var divCell = sender;
And at the F12 Tools console i can ask for the global event
object:
>> event
{
actionURL : "",
altKey : false,
altLeft : false,
behaviorCookie : 0,
behaviorPart : 0,
bookmarks : null,
boundElements : {...},
button : 0,
buttonID : 0,
cancelBubble : false
...
}
And i can ask for the event.srcElement
object:
>> event.srcElement
{
align : "",
noWrap : false,
dataFld : "",
dataFormatAs : "",
dataSrc : "",
currentStyle : {...},
runtimeStyle : {...},
accessKey : "",
className : "header",
contentEditable : "inherit"
...
}
But event.target
is empty:
>> event.target
And if i watch event
, there is no target
property:
So how do i access the target
property of an event
object in Internet Explorer (9 (Document Mode: IE9 Standards (Browser Mode: IE9)))?