我是做下拉菜单功能来的。。

hide:function (i,evt) {
    e= evt || window.event;
e.relatedTarget=e.relatedTarget || e.toElement;
if(e.relatedTarget ==nvaDiv[i]){
return;
}
this.nvaDiv[i].style.display="none";
}
}
我鼠标移动出判断是移出在那个对象上。。为什么我这样
e.relatedTarget=e.relatedTarget || e.toElement;
标准化不了哈。。就卡在这里功能就完成了!全部JS代码
window.onload=function () {
function menu(nva,nvaDiv){
this.nva=nva;
this.nvaDiv=nvaDiv;
var _this=this;
for(var i=0;i<nva.length;i++){
hai(i,_this);
}

}function hai(i,_this){
nva[i].onmouseover=function () {
_this.show(i);
};
nva[i].onmouseout=function (evt) {
_this.hide(i,evt);
};
nvaDiv[i].onmouseout=function (evt){
_this.hide(i,evt);
};
}
menu.prototype={
show:function (i) {

this.nvaDiv[i].style.display="block";
},
hide:function (i,evt) {
    e= evt || window.event;
e.relatedTarget=e.relatedTarget || e.toElement;
if(e.relatedTarget ==nvaDiv[i]){
return;
}
this.nvaDiv[i].style.display="none";
}
}//获取li里的a
var nva=document.getElementById("show").getElementsByTagName("a");
//获取li里的a的div
var nvaDiv=document.getElementById("show").getElementsByTagName("div");
var m=new menu(nva,nvaDiv);};