return pops[degree]; }
CreatePopup(1); //创建一个2层的Popup家族
var oPopup = pops[0]; var timer = null;
/** *显示一级子菜单 *@param objShow - 显示子菜单的对象 *@param strGetID - 存储显示内容的标签id */ function showSubMenu1(objShow,strGetID) { clearTimer(); endHideSubMenu(); var objGet = eval(document.getElementById(strGetID)); pops[1].hide(); pops[0].document.body.innerHTML = objGet.innerHTML; pops[0].show(0,0,1,1,objShow); var intWidth = pops[0].document.body.scrollWidth; var intHeight = pops[0].document.body.scrollHeight; pops[0].hide(); pops[0].show(10,objShow.offsetHeight-2,intWidth,intHeight,objShow); }
/** *显示二级菜单 *@param strGetID - 存储显示内容的标签id *@param objTr - 显示子菜单的tr对象 */ function showSubMenu2(strGetID,objTr) { clearTimer(); endHideSubMenu(); var objGet = eval(document.getElementById(strGetID)); pops[1].document.body.innerHTML = objGet.innerHTML; pops[1].show(0,0,1,1,pops[0].document.body); var intWidth = pops[1].document.body.scrollWidth; var intHeight = pops[1].document.body.scrollHeight; pops[1].hide(); pops[1].show(objTr.offsetWidth - 2,-2, intWidth, intHeight, objTr);
}
//隐藏一级子菜单 function hideSubMenu1(){ //pops[0].hide(); window.setTimeout("pops[0].hide()", 1000); }
//隐藏二级子菜单 function hideSubMenu2() { //clearTimer(); //timer = window.setTimeout("pops[1].hide()", 1000); pops[1].hide(); }
//隐藏所有下拉菜单 function hideSubMenu() { if(pops[0] != null)pops[0].hide(); if(pops[1] != null)pops[1].hide(); }
function clearTimer() { if (timer != null) window.clearTimeout(timer) timer = null;
上一篇:datagridcolumnstyle重写,实现插入不同控件列体验
下一篇:亚马逊欲推音乐视频下载 将以包月形式出现
|