Can I get the html element in an event trigger function in javascript?


Edit: I need to mention that I do not want to use jQuery. This is my code. I need to access the element which triggered the event such that I don't have to make two different functions for each html element.

document.getElementById("login").onmouseover = turnWhite;

function turnWhite(e){

I need maybe something like this. Don't know if it's possible though.

function turnWhite(e){ = "white";

Is this possible?

According to

  • e.srcElement in Internet Explorer
  • in most other browsers.