pad.style.display="none"; for(var i=1;i<len;i++){ var Row=pad.insertRow(i-1); menu.addMenuPadItem(ary[i],Row); } menu.pads[index]=pad; } //各子菜单按钮 this.addMenuPadItem=function(ary,Row){ var Cell=Row.insertCell(0); if(ary[0]!="--"){ Cell.innerText=ary[0]; if(ary[3]){ //有效状态; Cell.className=id+"_padItem"; Cell.onmouseover=function(){ Cell.className=id+"_padItemHover"; window.status=ary[4]; } Cell.onmouseout=function(){ Cell.className=id+"_padItem"; window.status=""; } Cell.onmousedown=function(){ Cell.className=id+"_padItemDown"; } Cell.onmouseup=function(){ Cell.className=id+"_padItemHover"; menu.hideMenu(); menu.execute(ary); } } else{ //按钮无效; Cell.className=id+"_padItemFalse"; Cell.onmouseover=function(){ Cell.className=id+"_padItemFalseHover"; window.status=ary[4]; } Cell.onmouseout=function(){ Cell.className=id+"_padItemFalse"; window.status=""; } } } else{ var hr=menu.crtElement("hr",Cell); hr.className=id+"_hr"; } Cell.onclick=function(){ event.cancelBubble=true; } } |