zoukankan      html  css  js  c++  java
  • 自定义app_offline.htm,让网站升级提示更专业

    用 VS2005 发布新网站时,VS会自动上传个 app_offline.htm 到网站上。

    这时,所有的网站连接都成为如下图所示:
    r_offline.jpg

    提示信息对开发者来说,有点用处。但是,对于正在访问中用户来说,实在是蹩脚。

    那么,如何让升级的时候,给访问用户一个良好的信息提示呢?

    答案很简单,修改VS2005里的这个文件 app_offline.htm
    路径: C:\Documents and Settings\Silver\Application Data\Microsoft\VisualStudio\8.0
    (路径与VS2005安装目录有关)

    以下发个修改示例:
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml" >
    <head>
        <title>网站升级中</title>
      <meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
    </head>
    <style>
    div {
        background-color:#ffffcc;
        padding-top:10px;
        padding-bottom:10px;
        padding-left:10px;
        padding-right:10px;   
        border-style:solid;
        border-color:Black;
        border-1px;
    }
      #WaitTimeSpan { color: blue; font-family: verdana; font-weight: bold; }
      body{ font-size: 42pt; background-color: silver; text-align:center; }
     
    </style>
    <body>
      <div> 
    <p>网站正在升级中……</p>
    <p>请稍等 <span id="WaitTimeSpan">61</span> 秒……</p>
    <p>敬请谅解!</p>
      <p>Web Site Update in progress. </p>
      <p>Please wait for a moment.</p>
      </div>
    <script type="text/javascript">
    function Goto()
    {
        var waitTimeSpan = document.getElementById("WaitTimeSpan");
        var seconds = parseInt(waitTimeSpan.innerText);
       
        if (seconds == 0)
        {
            location.href = location.href;
            return;
        }
        else
        {
            seconds--;
            waitTimeSpan.innerText = seconds.toString();
        }   
        setTimeout("Goto()", 1000);
    }
    Goto();
    </script>
    </html>


    参看示例:
    r_WebSiteUpdate.jpg
  • 相关阅读:
    hdu 1593 find a way to escape
    bzoj4561: [JLoi2016]圆的异或并
    hdu 3511 Prison Break
    hdu 5299 Circles Game
    ORA-15025: could not open disk "/dev/asm***"--转载
    修改目的端trail文件的最大大小--转载
    MYSQL PERFORMANCE_SCHEMA HINTS
    Oracle 收缩表大小 Oracle Shrink Table --转载
    InnoDB: Error number 24 means ‘Too many open files’.--转载
    使用asmcmdcp命令把datafile从文件系统移动(move)到asm磁盘组中 针对11gR2
  • 原文地址:https://www.cnblogs.com/sasbya/p/789594.html
Copyright © 2011-2022 走看看