javascript---window.createPopup

在Web上使用菜单可以极大地节约页面的空间,同时也比较的符合用户从Windows上继承下来的UI操作体验。在以往的Web页菜单设计中,我们 普遍使用div嵌套table的方式来实现菜单,这样的菜单有个最致命的问题就是会被<select>覆盖。我们为了解决这个问题,有时我们 干脆在显示图层菜单的同时隐藏页面上的所有下拉列表框,在菜单消失的时候,再显示他们。这个方法虽然可以解决问题,而其优化过后还可以只隐藏和下拉列表框 相交的列表框,但是这些解决方法都不是十分的完美。还有些小问题,这样的菜单定位很困难,因为在<div>显示的时候,用户可以使用鼠标滚轮 滚动页面,这样一来是否要让<div>菜单和页面滚动同步呢?如果不要,页面被滚走了,菜单仍显示在一个和自己毫不相关的位置上很是古怪。如 果要同步,那么噩梦就来了,因为被滚动的区域不一定就是<body>区域,还可能是一些类似<div style="overflow:auto"><div>的区域,要算出菜单的位置将会非常的麻烦。 

下面将介绍的Popup来实现的Web页菜单将完全解决<div>做为菜单容器时遇到的问题,Popup窗口是IE5.5及以后版本提供的一个新feature。什么是popup呢?简单说popup其实就是一个弹出窗口,它拥有以下特点(MSDN描述):

·popup窗口在用户点击它自身之外的任何地方或另一个popup打开的时候会自动关闭;

·popup在显示的时候不能获得焦点,所以用户已focused的操作将继续在其父窗口中执行;

·组成popup的DHTML可以存储在其父document或其他的document元素中;

·popup窗口中不支持文本框一类的编辑框element;

·不能选中popup窗口中的元素;

·不能在popup窗口中navigate(点击popup中的连接,不能让更新的内容显示到这个popup中); 

·popup窗口一旦显示就不能移动和resize。

这里MSDN说的不全,而且有的地方不是很准确,popup窗口还有几个重要的特性。它可以超出浏览器的窗口范围而且也不会被下拉框、flash、 IFrame等这些元素遮挡。实际上popup里的内容是可以被选择的,不知道MSDN说的不能选择是啥意思?。关于MSDN说popup不能获得焦点也 有点问题,其实是popup里的编辑框类控件不能获得焦点,而其它的非可编辑控件是可以获得焦点的。而且popup显示的时候,IE主窗口不能获得鼠标的 onmousewheel事件。 

这样的一些特性,恰好表明了popup窗口非常的适合用来制作弹出菜单,并且由于popup窗口显示的时候,IE窗口内的文档是不能被移动的,这样 就不存在context menu的位置同步问题了,因为毕竟popup窗口不能move(move位置需要hide以后在新的位置上重show),这个问题还比较讨厌。

使用popup窗口制作无限级别的菜单,有两个问题要解决:一个是要能在一个IE中显示多个Popup窗口,二是要能把窗口中的一些事件俘获并执行 我们脚本过程。MSDN在描述popup窗口特性时,第一条就说了只要有另一个popup窗口开启,先前显示的popup窗口就会自动关闭。这下怎么办 呢?不过既然都说了要实现无限级的菜单了,办法还是有的。对于popup,使用方式其实是很简单的,他一共就只包含了两个方法:hide()和show (...),和两个属性:document和isOpen。虽然在IE中我们连续的调用n次window.createPopup().show (...)只能出来一个popup窗口被显示,可是我们可以调用popup.document.parentWindow的createPopup方法, 它产生的popup窗口在显示的时候就不会关闭前面已显示的popup窗口,并且对于新的popup用这个方法可以继续开启child popup。这个问题再研究下去,会发现IE实现popup的一些怪异的地方(当然这些对于我们实现这个菜单关系不太大,只是觉得混乱)。

比如我们在一个IE窗口中,var popup = window.createPopup(); var win = popup.document.parentWindow; 我们会发现 window != win,对于多个popup可以共存,这个不相等还能理解,但是当我们调用win.resizeTo(...)的时候,我们发现父IE窗口被resize 了。同样我们在popup中select all,结果也是父IE窗口里的内容被全选了@_@...

下面是实现了一级菜单的window.createPopup()

<% @ Page Language="C#" AutoEventWireup="true" CodeFile="Frame_stuFrame_top.aspx.cs" Inherits="page_P_frame_Frame_stuFrame_top"  %>

< html  xmlns ="http://www.w3.org/1999/xhtml"   >
< head  runat ="server" >
    
< title > 电子商务实践平台 </ title >
    
< meta  http-equiv ="Content-Type"  content ="text/html; charset=gb2312"   />
    
< link  id ="css_main"  href =""  rel ="stylesheet"  type ="text/css"  runat ="server" >
  
    
< script  language ="javascript"  type ="text/javascript" >
        
var errorStr;
   
        
function mobileShow()
        
{
//            var curCols = parent.document.all.fstMain.cols;
//
            var setCols = "";
//
            var sCols = curCols.split(",");
//
            sCols[1] == "223" ? setCols = sCols[0] + ",0," + sCols[2] + "," + sCols[3] : setCols = sCols[0] + ",223," + sCols[2] + "," + sCols[3]
//
            parent.document.all.fstMain.cols = setCols;
        }

        
        
function messageShow()
        
{
            
            
            
var curCols = parent.document.all.fstMain.cols;
            
var setCols = "";
            
switch(curCols)
            
{
                
case "223,*,220":
                    setCols 
= "223,*,0";
                    
break;
                
case "0,*,0":
                    setCols 
= "0,*,220";
                    
break;
                
case "223,*,0":
                    setCols 
= "223,*,220";
                    
break;
                
case "0,*,220":
                    setCols 
= "0,*,0";
                    
break;
            }

            parent.document.all.fstMain.cols 
= setCols;
            
            
//var curCols = parent.document.all.fstMain.cols;
            //var setCols = "";
            //var sCols = curCols.split(",");
            //sCols[3] == "260" ? setCols = sCols[0] + "," + sCols[1] + "," + sCols[2] + ",0" : setCols = sCols[0] + "," + sCols[1] + "," + sCols[2] + ",260"
            //parent.document.all.fstMain.cols = setCols;
        }

        
        
function picShow()
        
{
            
            
            
var curCols = parent.document.all.fstMain.cols;
            
var setCols = "";
            
switch(curCols)
            
{
                
case "223,*,220":
                    setCols 
= "0,*,220";
                    
break;
                
case "0,*,0":
                    setCols 
= "223,*,0";
                    
break;
                
case "223,*,0":
                    setCols 
= "0,*,0";
                    
break;
                
case "0,*,220":
                    setCols 
= "223,*,220";
                    
break;
            }

            parent.document.all.fstMain.cols 
= setCols;
            
           
// var curCols = parent.document.all.fstMain.cols;
            //var setCols = "";
           // var sCols = curCols.split(",");
           // sCols[0] == "223" ? setCols = "0," + sCols[1] + "," + sCols[2] + "," + sCols[3] : setCols = "223," + sCols[1] + "," + sCols[2] + "," + sCols[3]
           // parent.document.all.fstMain.cols = setCols;
        }

        
        
function goright(e)
        
{
            
var speed=1;
            
var MyMar=setInterval(Marquee,speed);
            e.onmouseup
=function() {clearInterval(MyMar)}
        }


        
function goleft(e)
        
{
            
var speed=1;
            
var MyMar=setInterval(Marqueeleft,speed);
            e.onmouseup
=function() {clearInterval(MyMar)}
        }


        
function Marquee()
        
{
            demo.scrollLeft
++;
        }


        
function Marqueeleft()
        
{
            demo.scrollLeft
--;
        }


        
function createPage(formName,formID)
        
{
            
//先判断该窗体是否存在
            var forms = document.getElementById("hd_form");
            
var panel = document.getElementById("td_menu");
                    
            
if(forms.value.indexOf(formID + ";">= 0)
            
{
                
var formStr = forms.value.split(";");
                
var s;
                
                
                
for (s in formStr)   
                
{
                    
if(formStr[s] != "")
                    
{
                        document.getElementById(formStr[s]).className
="title2";
                    }

                }

                
//激活窗体
                pageFocus(formID);
            }

            
else
            
{
                
if(forms.value != "")
                
{
                    
var formStr = forms.value.split(";");
                    
var s;
                    
                    
for (s in formStr)   
                    
{
                        
if(formStr[s] != "")
                        
{
                            document.getElementById(formStr[s]).className
="title2";
                        }

                    }

                }

                
                
//新增窗体
                var childInput=document.createElement('input');
                childInput.setAttribute(
'id',formID);
                childInput.type
="button";
                childInput.className
="title1";
                childInput.value
=formName;                
                childInput.attachEvent(
'onclick',pageClick);        
                childInput.attachEvent(
'ondblclick',pageDbClick);        
                
                panel.appendChild(childInput);           
                
                forms.value 
+= formID + ";";
                
                pageFocus(formID);
                
            }

          
        }

        
        
function pageFocus(formID)
        
{
            
var forms = document.getElementById("hd_form");
            
var sumWidth = document.getElementById("demo");
            
var formStr = forms.value.split(";");
            
var s;
            
            
            
for (s in formStr)   
            
{
                
if(formStr[s] != "")
                
{
                    
if(formStr[s] == formID)
                    
{
                         
var curIndex = parseInt(s)+1;
                         
var curWidth = curIndex * 122 - 11;
                         
if(sumWidth.offsetWidth < curWidth)
                         
{
                            sumWidth.scrollLeft 
= curWidth - sumWidth.offsetWidth;
                            
if(curIndex < formStr.length)
                            
{
                                sumWidth.scrollLeft 
+= 20;
                            }

                         }

                         
else
                         
{
                            sumWidth.scrollLeft 
= 0;
                         }

                         
break;
                    }

                }

            }
     
            
            document.getElementById(formID).className
="title1";
            
//处理页面    
            //createPage
            parent.frames["mainFrame"].createPage(formID);
            
        }

        
        
function pageClose()
        
{
            
var panel = document.getElementById("td_menu");
            
var ppanel = parent.frames["mainFrame"].document.getElementById("td_menu");
           
           
var forms = document.getElementById("hd_form");
                
            
var formStr = forms.value.split(";");
            
var s;
            
            
            
for (s in formStr)   
            
{
                
if(formStr[s] != "")
                
{
                    
if(document.getElementById(formStr[s]).className=="title1")
                    
{
                         panel.removeChild(document.getElementById(formStr[s]));
                         
//document.getElementById(formStr[s]) = null;
                         if(ppanel)
                         
{
                            
var pFrame = parent.frames["mainFrame"].document.getElementById(formStr[s]);
                            
if(pFrame)
                            
{
                                ppanel.removeChild(pFrame);
                                
//pFrame = null;
                            }

                         }

                         
                         forms.value 
= forms.value.replace(formStr[s] + ";","");
                         
var pforms = parent.frames["mainFrame"].document.getElementById("hd_form");
                         
if(pforms)
                         
{
                            pforms.value 
= pforms.value.replace(formStr[s] + ";","");
                         }

                         
                         
//删除页面
                         
                         
if(forms.value != "")
                         
{
                            
if(s>0)
                            
{
                                pageFocus(formStr[parseInt(s) 
- 1]);
                            }

                            
else
                            
{
                                pageFocus(formStr[parseInt(s) 
+ 1]);
                            }

                         }

                         
break;
                    }

                }

            }
     
              
                
        }

        
        
function pageDbClick()
        
{
            pageClick();
            pageClose();
        }

        
        
function pageClick()
        
{
            
try
            
{
                
var forms = document.getElementById("hd_form");
                
                
var formStr = forms.value.split(";");
                
var s;
                
                
                
for (s in formStr)   
                
{
                    
if(formStr[s] != "")
                    
{
                        
if(document.getElementById(formStr[s]).className=="title1")
                        
{
                            document.getElementById(formStr[s]).className
="title2";
                            
break;
                        }

                    }

                }

                
                event.srcElement.className
="title1";
                
                pageFocus(event.srcElement.id);
                
            }

            
catch(e)
            
{
                errorStr 
= e;
            }

         
        }

        
        
function pageRe()
        
{
            parent.frames[
"mainFrame"].pageRe();
        }

        
        
function pageBack()
        
{
            parent.frames[
"mainFrame"].pageBack();
        }

        
        
function pageGo()
        
{
            parent.frames[
"mainFrame"].pageGo();
        }

    
</ script >
</ head >
< body  onload ="createPage('实验选择','ibtn_1');" >
    
< form  id ="form1"  runat ="server" >
    
< asp:ScriptManager  ID ="ScriptManager1"  runat ="server" >
        
</ asp:ScriptManager >
    
< input  type ="hidden"  id ="hd_form"  value =""   />
    
< table  width ="100%"  border ="0"  cellspacing ="0"  cellpadding ="0" >
  
< tr >
    
< td  width ="4"  height ="4"  background ="../../image/default/P_frame/border_r1_c1.gif" ></ td >
    
< td  background ="../../image/default/P_frame/border_r1_c2.gif" ></ td >
    
< td  width ="4"  background ="../../image/default/P_frame/border_r1_c3.gif" ></ td >
  
</ tr >
   
< tr >
    
< td  background ="../../image/default/P_frame/border_r2_c1.gif" ></ td >
    
< td  class ="topbg"  valign ="top" >
    
< table  width ="100%"  border ="0"  cellspacing ="0"  cellpadding ="0" >
      
< tr >
        
< td  class ="topmenu" >< img  src ="../../image/default/P_frame/arrow1.gif"  hspace ="6"  align ="absmiddle" >  
    
< href ="#"  onclick ="showMenu(this,'1');" > 实验操作(O) </ a >   < href ="#"  onclick ="showMenu(this,'2');" > 师生交流(E) </ a >   < href ="#"  onclick ="showMenu(this,'3');" > 成绩管理(R) </ a >   < href ="#"  onclick ="showMenu(this,'4');" > 系统设置(S) </ a >   < href ="#"  onclick ="showMenu(this,'5');" > 外观选择(A) </ a >   < href ="#"  onclick ="showMenu(this,'6');" > 系统帮助(H) </ a >
    
</ td >
      
</ tr >
    
</ table >
    
< table  width ="100%"  border ="0"  cellspacing ="0"  cellpadding ="0" >
      
< tr >
        
< td >
        
< table  width ="100%"  border ="0"  cellspacing ="0"  cellpadding ="0" >
          
< tr >
            
< td  class ="icomenu" >
            
< href ="#"  onclick ="createPage('实验选择','ibtn_1');" >< img  src ="../../image/default/P_frame/ico1.gif"  border ="0"  alt ="实验选择" ></ a >
            
< href ="#"  onclick ="createPage('个人信息管理','ibtn_2');" >< img  src ="../../image/default/P_frame/ico2.gif"  border ="0"  alt ="个人信息管理" ></ a >
            
< href ="#"  onclick ="createPage('企业信息管理','ibtn_3');" >< img  src ="../../image/default/P_frame/ico3.gif"  border ="0"  alt ="企业信息管理" ></ a >
            
< href ="#"  onclick ="createPage('成绩查询','ibtn_4');" >< img  src ="../../image/default/P_frame/ico4.gif"  border ="0"  alt ="成绩查询" ></ a >
            
< href ="#"  onclick ="createPage('实验报告','ibtn_5');" >< img  src ="../../image/default/P_frame/ico6.gif"  border ="0"  alt ="实验报告" ></ a >
            
< href ="#"  onclick ="createPage('电子商务文档','ibtn_6');" >< img  src ="../../image/default/P_frame/ico22.gif"  border ="0"  alt ="电子商务文档" ></ a >
            
< img  src ="../../image/default/P_frame/topmenuline.gif"  hspace ="10" >
            
< href ="#"  onclick ="picShow();" >< img  src ="../../image/default/P_frame/ico16.gif"  border ="0"  alt ="流程提示" ></ a >
            
< href ="#"  onclick ="messageShow();" >< img  src ="../../image/default/P_frame/ico15.gif"  border ="0"  alt ="即时通" ></ a >
            
< img  src ="../../image/default/P_frame/topmenuline.gif"  hspace ="10" >
            
< href ="#"  onclick ="pageBack();" >< img  src ="../../image/default/P_frame/ico7.gif"  border ="0"  alt ="后退" ></ a >
            
< href ="#"  onclick ="pageGo();" >< img  src ="../../image/default/P_frame/ico8.gif"  border ="0"  alt ="前进" ></ a >
            
< href ="#"  onclick ="pageRe();" >< img  src ="../../image/default/P_frame/ico9.gif"  border ="0"  alt ="刷新" ></ a >
            
< href ="#"  onclick ="createPage('关于我们','ibtn_10');" >< img  src ="../../image/default/P_frame/ico11.gif"  border ="0"  alt ="关于我们" ></ a >
            
< href ="#"  onclick ="createPage('问题反馈','ibtn_12');" >< img  src ="../../image/default/P_frame/ico12.gif"  border ="0"  alt ="问题反馈" ></ a >
            
< href ="#"  onclick ="createPage('修改密码','ibtn_11');" >< img  src ="../../image/default/P_frame/ico13.gif"  border ="0"  alt ="密码修改" ></ a >
            
< href ="#"  onclick ="createPage('在线帮助','ibtn_11');" >< img  src ="../../image/default/P_frame/ico28.gif"  border ="0"  alt ="在线帮助" ></ a >
            
< href ="#"  onclick ="if(window.confirm('确认重新登陆?'))parent.document.location='../../Default.aspx';" >< img  src ="../../image/default/P_frame/ico10.gif"  border ="0"  alt ="重新登陆" ></ a >
            
</ td >
            
< td  align ="right"  class ="pt10" >
            
< table  width ="100%"  border ="0"  cellspacing ="0"  cellpadding ="0" >
              
< tr >
                
< td  width ="20"  height ="20"  background ="../../image/default/P_frame/search_left.gif" ></ td >
                
< td  background ="../../image/default/P_frame/search_center.gif" >
                
< input  type ="text"  value ="http://www.allpass.com.cn"  class ="searchinput" >
                
</ td >
                
< td  width ="10"  background ="../../image/default/P_frame/search_right.gif" ></ td >
                
< td >< href ="#" >< img  src ="../../image/default/P_frame/go.gif"  hspace ="10" ></ a ></ td >
              
</ tr >
            
</ table >
            
</ td >
          
</ tr >
        
</ table >
        
< table  width ="100%"  border ="0"  cellspacing ="0"  cellpadding ="0"  class ="mt10" >
          
< tr >
            
< td  width ="15.8%"  class ="pb4" >
                
< asp:UpdatePanel  ID ="UpdatePanel1"  runat ="server" >
            
< ContentTemplate >
                
< href ="#" >< img  src ="../../image/default/P_frame/ico17.gif"  align ="absmiddle"  hspace ="5" ></ a >< span  class ="textf1" >< 10 ></ span >   < href ="#"  onclick ="messageShow();" >< img  src ="../../image/default/P_frame/ico15.gif"  align ="absmiddle"  hspace ="5" ></ a >< span  class ="textf1"  runat ="server"  id ="sp_newMessageNum" >< 0 ></ span >
                
< asp:Timer  ID ="Timer1"  runat ="server"  Interval ="30000"  OnTick ="Timer1_Tick" >
                
</ asp:Timer >
                
</ ContentTemplate >
                
</ asp:UpdatePanel >
            
</ td >
            
< td  width ="77.4%"  style ="overflow:hidden;" >
            
< div  id ="demo"  style ="OVERFLOW:hidden; padding-bottom:0px; width:97%; height:27px;" >
                
< table  width ="100%"  border ="0"  cellspacing ="0"  cellpadding ="0" >
                  
< tr >
                    
< td  id ="demo1" >                                         
                    
< table  border ="0"  cellspacing ="0"  cellpadding ="0"  width ="100%" >
                      
< tr  id ="tr_menu" >
                      
< td  id ="td_menu" ></ td >                                          
                      
</ tr >
                    
</ table >
                  
</ td >
                  
< TD  id =demo2  vAlign ="top" ></ TD >                   
                  
</ tr >
                
</ table >
                
</ div >
            
</ td >
            
< td  align ="right"  width ="6.8%" >
              
< href ="#"  onmousedown ="goleft(this);" >< img  src ="../../image/default/P_frame/forward.gif"  border ="0"  alt ="左转" ></ a >
              
< href ="#"  onmousedown ="goright(this);" >< img  src ="../../image/default/P_frame/rearward.gif"  border ="0"  alt ="右转" ></ a >
              
< href ="#"  onclick ="pageClose();" >< img  src ="../../image/default/P_frame/close.gif"  border ="0"  alt ="关闭" ></ a >
            
</ td >
          
</ tr >
        
</ table >

        
</ td >
      
</ tr >
    
</ table >

    
</ td >
    
< td  background ="../../image/default/P_frame/border_r2_c3.gif" ></ td >
  
</ tr >
</ table >

< div  style ="display:none"  id ="menu1"  onselectstart ="return false;" >    
< table  width ="120"  border ="0"  cellspacing ="0"  cellpadding ="0"  class ="divmenu" >
                            
              
< tr  onmouseover ="this.style.backgroundColor='#F5FDE7'"  onmouseout ="this.style.backgroundColor=''" >
                  
< td  class ="divmenu_col1" >< img  src ="../../IMAGE/DEFAULT/P_frame/ico1.gif"  hspace ="3" ></ td >
                
< td  onclick ="parent.createPage('实验选择','ibtn_1');parent.hideTask();"  class ="divmenu_pad" > 实验选择 </ td >
              
</ tr >
              
< tr  onmouseover ="this.style.backgroundColor='#F5FDE7'"  onmouseout ="this.style.backgroundColor=''" >
                  
< td  class ="divmenu_col1" >< img  src ="../../IMAGE/DEFAULT/P_frame/ico2.gif"  hspace ="3" ></ td >
                
< td  onclick ="parent.createPage('个人信息管理','ibtn_2');parent.hideTask();"  class ="divmenu_pad" > 个人信息管理 </ td >
              
</ tr >               
              
< tr  onmouseover ="this.style.backgroundColor='#F5FDE7'"  onmouseout ="this.style.backgroundColor=''" >
                  
< td  width ="24"  class ="divmenu_col1" >< img  src ="../../IMAGE/DEFAULT/P_frame/ico3.gif"  hspace ="3" ></ td >
                
< td  onclick ="parent.createPage('企业信息管理','ibtn_3');parent.hideTask();"  class ="divmenu_col2 divmenu_pad" > 企业信息管理 </ td >
              
</ tr >
            
</ table >   
  
</ div >    
  
< div    style ="display:none"    id ="menu2" >    
  
< table  width ="120"  border ="0"  cellspacing ="0"  cellpadding ="0"  class ="divmenu" >
                
< tr  onmouseover ="this.style.backgroundColor='#F5FDE7'"  onmouseout ="this.style.backgroundColor=''" >
                  
< td  class ="divmenu_col1" >< img  src ="../../IMAGE/DEFAULT/P_frame/ico17.gif"  hspace ="3" ></ td >
                
< td  onclick ="parent.createPage('留言簿','ibtn_12');parent.hideTask();"  class ="divmenu_pad" > 留言簿 </ td >
              
</ tr >     
              
< tr  onmouseover ="this.style.backgroundColor='#F5FDE7'"  onmouseout ="this.style.backgroundColor=''" >
                  
< td  width ="24"  class ="divmenu_col1" >< img  src ="../../IMAGE/DEFAULT/P_frame/ico15.gif"  hspace ="3" ></ td >
                
< td  onclick ="parent.messageShow();parent.hideTask();"  class ="divmenu_pad" > 即时通 </ td >
              
</ tr >
              
< tr  onmouseover ="this.style.backgroundColor='#F5FDE7'"  onmouseout ="this.style.backgroundColor=''" >
                  
< td  class ="divmenu_col1" >< img  src ="../../IMAGE/DEFAULT/P_frame/ico22.gif"  hspace ="3" ></ td >
                
< td  onclick ="parent.createPage('电子商务文档','ibtn_6');parent.hideTask();"  class ="divmenu_pad" > 电子商务文档 </ td >
              
</ tr >
            
</ table >
  
</ div >
   
< div    style ="display:none"    id ="menu3" >    
  
< table  width ="120"  border ="0"  cellspacing ="0"  cellpadding ="0"  class ="divmenu" >
                  
< tr  onmouseover ="this.style.backgroundColor='#F5FDE7'"  onmouseout ="this.style.backgroundColor=''" >
                    
< td  width ="24"  class ="divmenu_col1" >< img  src ="../../IMAGE/DEFAULT/P_frame/ico4.gif"  hspace ="3" ></ td >
                    
< td  onclick ="parent.createPage('成绩查询','ibtn_4');parent.hideTask();"  class ="divmenu_pad" > 成绩查询 </ td >
                  
</ tr >               
                  
< tr  onmouseover ="this.style.backgroundColor='#F5FDE7'"  onmouseout ="this.style.backgroundColor=''" >
                    
< td  class ="divmenu_col1" >< img  src ="../../IMAGE/DEFAULT/P_frame/ico6.gif"  hspace ="3" ></ td >
                    
< td  onclick ="parent.createPage('实验报告','ibtn_5');parent.hideTask();"  class ="divmenu_pad" > 实验报告 </ td >
                  
</ tr >     
                
</ table >   
  
</ div >
   
< div    style ="display:none"    id ="menu4" >    
  
< table  width ="120"  border ="0"  cellspacing ="0"  cellpadding ="0"  class ="divmenu" >
                  
< tr  onmouseover ="this.style.backgroundColor='#F5FDE7'"  onmouseout ="this.style.backgroundColor=''" >
                    
< td  width ="24"  class ="divmenu_col1" >< img  src ="../../IMAGE/DEFAULT/P_frame/ico13.gif"  hspace ="3" ></ td >
                    
< td  onclick ="parent.createPage('修改密码','ibtn_11');parent.hideTask();"  class ="divmenu_pad" > 修改密码 </ td >
                  
</ tr >               
                  
< tr  onmouseover ="this.style.backgroundColor='#F5FDE7'"  onmouseout ="this.style.backgroundColor=''" >
                    
< td  class ="divmenu_col1" >< img  src ="../../IMAGE/DEFAULT/P_frame/ico10.gif"  hspace ="3" ></ td >
                    
< td  onclick ="if(window.confirm('确认重新登陆?'))parent.parent.document.location='../../Default.aspx';parent.hideTask();"  class ="divmenu_pad" > 重新登录 </ td >
                  
</ tr >
                  
< tr  onmouseover ="this.style.backgroundColor='#F5FDE7'"  onmouseout ="this.style.backgroundColor=''" >
                    
< td  class ="divmenu_col1" >< img  src ="../../IMAGE/DEFAULT/P_frame/ico31.gif"  hspace ="3" ></ td >
                    
< td  onclick ="if(window.confirm('确认退出系统?'))parent.parent.close();parent.hideTask();"  class ="divmenu_pad" > 退出系统 </ td >
                  
</ tr >     
                
</ table >    
  
</ div >
   
< div    style ="display:none"    id ="menu5" >    
  
< table  width ="120"  border ="0"  cellspacing ="0"  cellpadding ="0"  class ="divmenu" >
                  
< tr  onmouseover ="this.style.backgroundColor='#F5FDE7'"  onmouseout ="this.style.backgroundColor=''" >
                    
< td  width ="24"  class ="divmenu_col1" >< img  src ="../../image/default/INDEX/color_01.gif"  hspace ="3"   /></ td >
                    
< td  onclick ="parent.location.href='#';parent.hideTask();"  class ="divmenu_pad" > 默认 </ td >
                  
</ tr >               
                  
< tr  onmouseover ="this.style.backgroundColor='#F5FDE7'"  onmouseout ="this.style.backgroundColor=''" >
                    
< td  class ="divmenu_col1" >< img  src ="../../image/default/INDEX/color_02.gif"  hspace ="3"   /></ td >
                    
< td  onclick ="parent.location.href='#';parent.hideTask();"  class ="divmenu_pad" > 宝石绿 </ td >
                  
</ tr >
                  
< tr  onmouseover ="this.style.backgroundColor='#F5FDE7'"  onmouseout ="this.style.backgroundColor=''" >
                    
< td  class ="divmenu_col1" >< img  src ="../../image/default/INDEX/color_04.gif"  hspace ="3"   /></ td >
                    
< td  onclick ="parent.location.href='#';parent.hideTask();"  class ="divmenu_pad" > 天空蓝 </ td >
                  
</ tr >     
                  
< tr  onmouseover ="this.style.backgroundColor='#F5FDE7'"  onmouseout ="this.style.backgroundColor=''" >
                    
< td  class ="divmenu_col1" >< img  src ="../../image/default/INDEX/color_03.gif"  hspace ="3"   /></ td >
                    
< td  onclick ="parent.location.href='#';parent.hideTask();"  class ="divmenu_pad" > 紫罗兰 </ td >
                  
</ tr >
                
</ table >  
  
</ div >
   
< div    style ="display:none"    id ="menu6" >    
  
< table  width ="120"  border ="0"  cellspacing ="0"  cellpadding ="0"  class ="divmenu" >
                  
< tr  onmouseover ="this.style.backgroundColor='#F5FDE7'"  onmouseout ="this.style.backgroundColor=''" >
                    
< td  width ="24"  class ="divmenu_col1" >< img  src ="../../IMAGE/DEFAULT/P_frame/ico28.gif"  hspace ="3" ></ td >
                    
< td  onclick ="parent.location.href='#';parent.hideTask();"  class ="divmenu_pad" > 在线帮助 </ td >
                  
</ tr >               
                  
< tr  onmouseover ="this.style.backgroundColor='#F5FDE7'"  onmouseout ="this.style.backgroundColor=''" >
                    
< td  class ="divmenu_col1" >< img  src ="../../IMAGE/DEFAULT/P_frame/ico12.gif"  hspace ="3" ></ td >
                    
< td  onclick ="parent.location.href='#';parent.hideTask();"  class ="divmenu_pad" > 问题反馈 </ td >
                  
</ tr >
                  
< tr  onmouseover ="this.style.backgroundColor='#F5FDE7'"  onmouseout ="this.style.backgroundColor=''" >
                    
< td  class ="divmenu_col1" >< img  src ="../../IMAGE/DEFAULT/P_frame/ico11.gif"  hspace ="3" ></ td >
                    
< td  onclick ="parent.location.href='#';parent.hideTask();"  class ="divmenu_pad" > 关于我们 </ td >
                  
</ tr >                   
                
</ table >      
  
</ div >
  
  
< SCRIPT >    
  
var oPopup = window.createPopup();   
      
  
function showMenu(obj,x)   
  
{           
        
var oPopBody = oPopup.document.body;         
        oPopup.document.createStyleSheet().addImport(
"../../CSS/DEFAULT/P_frame/main.css");
        
var HTML = document.all("menu" + x).innerHTML;   
        oPopBody.innerHTML 
= HTML;     
        
var rows = HTML.match(/<TR onmouseover="this.style.backgroundColor='#F5FDE7'" onmouseout="this.style.backgroundColor=''">/g).length;   
        oPopup.show(obj.offsetLeft 
+ 4,obj.offsetTop + 22,120,rows * 28,document.body);   
  }
     
      
      
function hideTask()
        
{
            oPopup.hide();
        }

  
</ SCRIPT >  
    
</ form >
</ body >
</ html >

 

 
  • 0
    点赞
  • 6
    收藏
    觉得还不错? 一键收藏
  • 2
    评论
评论 2
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值