zoukankan      html  css  js  c++  java
  • 在IE耗时操作中加入进度条或进度框

    加入进度条
    this.Page.Response.Write("<div id='mydiv' >");
       this.Page.Response.Write("_");
       this.Page.Response.Write("</div>");
       this.Page.Response.Write("<script>mydiv.innerText = '';</script>");
       this.Page.Response.Write("<script language=javascript>;");
       this.Page.Response.Write("var dots = 0;var dotmax = 10;function ShowWait()");
       this.Page.Response.Write("{var output; output = '正在查询,请稍后';dots++;if(dots>=dotmax)dots=1;");
       this.Page.Response.Write("for(var x = 0;x < dots;x++){output += '·';}mydiv.innerText =  output;}");
       this.Page.Response.Write("function StartShowWait(){mydiv.style.visibility = 'visible'; ");
       this.Page.Response.Write("window.setInterval('ShowWait()',1000);}");
       this.Page.Response.Write("function HideWait(){mydiv.style.visibility = 'hidden';");
       this.Page.Response.Write("window.clearInterval();}");
       this.Page.Response.Write("StartShowWait();</script>");
       this.Page.Response.Flush();

     .........

       this.Page.Response.Write("<script language=javascript>HideWait();</script>");

    加入进度框

    this.Page.Response.Write("<script language=javascript>var win;win=window.open('_layouts/bluetech/loading.htm','progress','toolbar=no,location=no,status=no,menubar=no,scrollbars=no,resizable=no,width=270,height=201,screenX='+(screen.width-270)/2+',screenY='+(screen.height-201)/2+',top='+(screen.height-201)/2+',left='+(screen.width-270)/2+'');</script>");
       this.Page.Response.Flush();
       ...........

       this.Page.Response.Write("<script language=javascript>win.close();</script>");
  • 相关阅读:
    【转自百度贴吧】把古诗最后三个字改为“日了狗”,看谁最有才!
    计划!
    [BZOJ2424][HAOI2010]订货
    [BZOJ1026][SCOI2009]windy数
    【作文】高考之外
    [AYYZVijos1761]运输问题
    [BZOJ1047][HAOI2007]理想的正方形
    [NOIP2015]代码
    新的独立博客
    不忘初心,方得始终——NOIP2016前的感悟
  • 原文地址:https://www.cnblogs.com/willpower/p/77922.html
Copyright © 2011-2022 走看看