eml.onmouseover = function (e) { if (!e) var e = window.event; var evnt = e.type; var target = event.target || event.srcElement; } will get the get the event and the target, but how can I get the same result without having an e on the
@Declan1991Jun 28.2008 — #You mean<i> </i>eml.onmouseover = function () { var e = window.event||arguments[arguments.length-1]; var evnt = e.type; var target = event.target || event.srcElement; }
@felgallJun 28.2008 — #That just makes the code longer without making any other difference whatever except for saving you the trouble of remembering where to put the e when there are other parameters passed as well.
@Declan1991Jun 28.2008 — #That just makes the code longer without making any other difference whatever except for saving you the trouble of remembering where to put the e when there are other parameters passed as well.[/QUOTE] Well it does, and I've never had a reason to use it, but maybe this user has (though I doubt it).
@bialeckiJun 29.2008 — #I agree here. You should always be explicit about what arguments you are expecting so if someone (probably you) has to change the function a while down the line, they know what arguments they can expect.
Well it does, and I've never had a reason to use it, but maybe this user has (though I doubt it).[/QUOTE]