• 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);

    }

  • 相关阅读:
    转载:javaweb学习总结(八)——HttpServletResponse对象(二)
    转载:javaweb学习总结(七)——HttpServletResponse对象(一)
    转载:javaweb学习总结(六)——Servlet开发(二)
    转载:javaweb学习总结(五)——Servlet开发(一)
    转载:javaweb学习总结(四)——Http协议
    蓝桥杯 答题分数
    Saruman's Army (POJ 3069)
    Best Cow Line (POJ 3217)
    区间调度问题
    硬币问题
  • 原文地址:https://www.cnblogs.com/yclnet/p/3237554.html
Copyright © 2020-2023  润新知