function getEvent()
{
var i = 0 ;
if(document.all){
return window.event;
}
func = getEvent.caller;
while(func != null)
{
var arg0 = func.arguments[0];
if(arg0)
{
if(arg0.constructor == MouseEvent)
{
return arg0;
}
}
func = func.caller;
}
return null;
}
If you want to make a reference in the function, you must pass the parameter e before you can wait:
function buttonOver(e)
{
e = getEvent( );
var obj = e.srcElement || e.target;
if (obj.runtimeStyle){
obj.runtimeStyle.cssText = "background-color:#FFFFFF";
}
else
obj.style.background = "#FFFFFF";
}
Statement:The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn