window.__defineGetter__("event", function () { //兼容Event对象 var o = arguments.callee; do { if (o.arguments[0] instanceof Event) return o.arguments[0]; } while (o = o.caller); return null; });
Event.prototype.__defineGetter__("srcElement", function () { //兼容Event.srcElement对象 var n = this.target; while (n.nodeType != 1) n = n.parentNode; return n; });
}})(/Firefox/.test(window.navigator.userAgent));var e = window.event; if ((e.keyCode || e.which) == 40) { }
(function (bool) { //兼容FF一些方法
if (bool) {
window.__defineGetter__("event", function () { //兼容Event对象 var o = arguments.callee; do { if (o.arguments[0] instanceof Event) return o.arguments[0]; } while (o = o.caller); return null; });
Event.prototype.__defineGetter__("srcElement", function () { //兼容Event.srcElement对象 var n = this.target; while (n.nodeType != 1) n = n.parentNode; return n; });
}})(/Firefox/.test(window.navigator.userAgent));var e = window.event; if ((e.keyCode || e.which) == 40) { }
window.__defineGetter__("event", function () { //兼容Event对象 var o = arguments.callee; do { if (o.arguments[0] instanceof Event) return o.arguments[0]; } while (o = o.caller); return null; });
}})(/Firefox/.test(window.navigator.userAgent));document.onkeydown = function () { var e = window.event; alert(e.keyCode || e.which); //其实FF2.0已经支持keyCode方法了 }; </script>
//兼容FF一些方法
if (bool) {
window.__defineGetter__("event", function () {
//兼容Event对象
var o = arguments.callee;
do {
if (o.arguments[0] instanceof Event) return o.arguments[0];
} while (o = o.caller);
return null;
});
Event.prototype.__defineGetter__("srcElement", function () {
//兼容Event.srcElement对象
var n = this.target;
while (n.nodeType != 1) n = n.parentNode;
return n;
});
}})(/Firefox/.test(window.navigator.userAgent));var e = window.event;
if ((e.keyCode || e.which) == 40) {
}
(function (bool) {
//兼容FF一些方法
if (bool) {
window.__defineGetter__("event", function () {
//兼容Event对象
var o = arguments.callee;
do {
if (o.arguments[0] instanceof Event) return o.arguments[0];
} while (o = o.caller);
return null;
});
Event.prototype.__defineGetter__("srcElement", function () {
//兼容Event.srcElement对象
var n = this.target;
while (n.nodeType != 1) n = n.parentNode;
return n;
});
}})(/Firefox/.test(window.navigator.userAgent));var e = window.event;
if ((e.keyCode || e.which) == 40) {
}
{
last();
}
(function (bool) {
//兼容FF一些方法
if (bool) {
window.__defineGetter__("event", function () {
//兼容Event对象
var o = arguments.callee;
do {
if (o.arguments[0] instanceof Event) return o.arguments[0];
} while (o = o.caller);
return null;
});
}})(/Firefox/.test(window.navigator.userAgent));document.onkeydown = function () {
var e = window.event;
alert(e.keyCode || e.which); //其实FF2.0已经支持keyCode方法了
};
</script>