Because of the different browser to the JS file resolution, plus the various browser kernel is not the same, and the kernel version is not the same, so the way to get the event is not the same.
Getting the event using the original method is
Such a:
Document.body.onclick=function (e) {e=e| | window.event;};
In fact, you will want to re-assign the value because the event is instantaneous, so save it.
This method can be implemented, but ensure that the parameters passed are e.
There is another way to do this:
Upanddownlistener:function (obj) {var ev = document.all? window.event:event;if (Ev.keycode = =) {this.checkdouble (obj) ;d Efaulttrendgroup.trendredraw (); ev.returnvalue = false;}}
This time can be achieved to get the event, but in the Firefox browser has been error, but the program can be carried out.
The following is a way to solve the problem in the second way:
Upanddownlistener:function (obj) {var ev = document.all? Window.event:arguments[0]? Arguments[0]: Event;if (ev.keyCode = =) {this.checkdouble (obj);d efaulttrendgroup.trendredraw (); ev.returnvalue = false;}},
This way you can solve the problem in Firefox error.
For the above three ways, different ways can be used in different situations.
Copyright NOTICE: This article for Bo Master original article, without Bo Master permission not reproduced.
Firefox gets event