zoukankan      html  css  js  c++  java
  • js中弹出各种窗口方法

    //在屏幕中央弹出新窗口 function openNewWindow(width,height,url){     var startW = (screen.availWidth - width)/2;     var startH = (screen.availHeight - height)/2;     window.open(url,"_blank","left="+startW+",top="+startH+",height="+height+",width="+width+",status=no,resizable=1,scrollbars=yes,toolbar=no,menubar=no,location=no"); }

    //在屏幕中央弹出打开Word的新窗口 function openWordWindow(url){     var width=800;     var height=600;     var startW = (screen.availWidth - width)/2;     var startH = (screen.availHeight - height)/2;     window.open(url,"_blank","left="+startW+",top="+startH+",height="+height+",width="+width+",status=no,resizable=1,scrollbars=yes,toolbar=no,menubar=yes,location=no"); }

    //在屏幕中央弹出新窗口

    function openNewWindowByMenu(width,height,url){     var startW = (screen.availWidth - width)/2;     var startH = (screen.availHeight - height)/2;    

    window.open(url,"_blank","left="+startW+",top="+startH+",height="+height+",width="+width+",status=yes,resizable=1,scrollbars=yes,toolbar=yes,menubar=yes,l

    ocation=no"); }

    //弹出全屏窗口

    function openNewWindowByMenu(url){     window.open(url,"_blank","left=0,top=0,height="+screen.availHeight+",width="+screen.availWidth+",status=yes,resizable=1,scrollbars=yes,toolbar=yes,

    menubar=yes,location=no"); }

    //在屏幕中央弹出模态窗口 function openModelWindow(width,height,url){     var d = new Date;     if(url.lastIndexOf("?")==-1){       

      url = url+"?currTime="+d.getTime();     }else{         url = url+"&currTime="+d.getTime();     }     window.showModalDialog(url,window,"dialogHeight:"+height+"px;dialogWidth:"+width+"px;center:Yes;Help:No;Resizable:No;Scroll:auto;Status:no;");  

      }

    //在屏幕中央弹出模态窗口

    function openNewModelWindow(width,height,url,Resizable){     var d = new Date;   

      if(url.lastIndexOf("?")==-1){         url = url+"?currTime="+d.getTime();   

      }else{     

        url = url+"&currTime="+d.getTime();    

    }    

    window.showModalDialog(url,window,"dialogHeight:"+height+"px;dialogWidth:"+width+"px;center:Yes;Help:No;Resizable:yes;Scroll:auto;Status:no;");   

    }

    //处理url,在后面自动加上当前当前时间 function dealUrl(url){    

    var d = new Date;     if(url.lastIndexOf("?")==-1)

    {         url = url+"?currTime="+d.getTime();

      }else{    

         url = url+"&currTime="+d.getTime();  

       }     return url; }

    //在屏幕中央弹出可拖动、可滚动窗口

    function openAbleWindow(width,height,url){

        var d = new Date;  

       if(url.lastIndexOf("?")==-1){   

          url = url+"?currTime="+d.getTime();     }

    else{        

    url = url+"&currTime="+d.getTime();   

      }    

    window.showModalDialog(url,window,"dialogHeight:"+height+"px;dialogWidth:"+width+"px;center:Yes;Help:No;Resizable:Yes;Scroll:Yes;Status:no;");    }

    //在屏幕中央弹出公共的查询模态窗口

    function openCommonQueryModelWindow(url)

    {    

    openModelWindow(600,350,url);

    }

  • 相关阅读:
    相对定位
    51nod三大经典博弈(模板)
    51nod1306斐波那契公约数(数论推公式,矩阵快速幂优化递推序列)
    洛谷P1313计算系数(数学二项式次方展开定理,快速幂,除法取模逆元)
    hduoj1052田忌赛马(贪心好题略难,思维,模拟)
    洛谷P1134阶乘问题(数论,末尾0的个数变形,思维转换)
    洛谷P又是毕业季2(数学数论,找规律,公约数)
    洛谷p1309瑞士轮(好题,理解归并排序本质)
    洛谷p1582倒水(思维好题,数学,2进制问题,代码实现)
    洛谷p1338末日的传说(思维好题,数学)
  • 原文地址:https://www.cnblogs.com/yclnet/p/3237554.html
Copyright © 2011-2022 走看看