Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7957485
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T04:15:23+00:00 2026-06-04T04:15:23+00:00

The HTML DOM object model defines an Event object with a target property .

  • 0

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:

enter image description here

So how do i access the target property of an event object in Internet Explorer (9 (Document Mode: IE9 Standards (Browser Mode: IE9)))?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-04T04:15:24+00:00Added an answer on June 4, 2026 at 4:15 am

    If you want to use event.target in IE9, you’ll need to use addEventListener()-method to assign eventhandler to the element.

    <div id="day" class="day"></div>
    
    document.getElementById('day').addEventListener('click',divClick,false);
    
    function divClick(e){
       alert(e.target);
       divCell=this;
       :
    }
    

    In divClick() you can refer day simply using keyword this. Argument e contains a reference to the event-object itself.

    BTW, in MSDN you can find maybe more suitable IE-documentation for Web development instead of Windows development.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Is it possible to load an html document into a DOM javascript object so
HTML has a Document Object Model, which Javascript can then manipulate / move around.
All i want is to pass a HTML (DOM object) from javascript to Actionscript.
How do you load an HTML DOM document into Scala? The XML singleton had
I have a DOM object with loaded HTML markup. I'm trying to replace all
Rather than population said DOM object with an external page such as HTML CFM
From this document, Don't do this car = new Object(); car.make = Honda; car.model
I am using PHP's DOM object to create HTML pages for my website. This
I was reading the page about the Document Object Model on Wikipedia. One sentence
Is it possible to animate a DOM Object by a css-property from a variable

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.