zoukankan      html  css  js  c++  java
  • js定时三秒后自动跳转页面

    <%@ page language="java" import="java.util.*" pageEncoding="GB18030"%>

    <%

    String path = request.getContextPath();

    String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";

    %>

     <%@include file="/common/common.jsp" %>

    <html>

    <head>

        <base href="<%=basePath%>">

        <title>修改论文</title>

    <meta http-equiv="pragma" content="no-cache">

    <meta http-equiv="cache-control" content="no-cache">

    <meta http-equiv="expires" content="0">    

    <meta http-equiv="keywords" content="keyword1,keyword2,keyword3">

    <meta http-equiv="description" content="This is my page">

    <script src="script/Calendar.js" type="text/javascript"></script>

    <link href="css/css.css" rel="stylesheet" />

    </head>

      <script type="text/javascript">

     var time = 4;

    function clock(){

    time--;

    document.getElementById("info").innerHTML = "窗口将在"+time+"秒后自动跳转";

    var action = document.getElementById("me").value;

    if(time==0){

          window.location.href="actions/"+action;

        }

    }

    setInterval("clock();",1000);

    </script>

    <body>

    <table  width="50%" align="center" cellspacing="0"  class="faTable">

      <tr>

        <td align="center"  class="faTdleft" id="info" >

             发送成功!本窗口将在3秒后自动跳转

        </td>

        <input type="hidden" id="me" value="${action}" />

      </tr>

    </table>

    </body>

    </html>

    注:  ${action} 要在跳转的action放入 就是方法名

  • 相关阅读:
    汇编语言 第三章 寄存器
    汇编语言 第二章
    实验一 查看CPU和内存,用机器指令和汇编指令教程
    nginx的log、upstream和server
    高并发情况下Linux系统及kernel参数优化
    二进制方式安装docker(非root用户启动docker)
    redis
    redis配置文件详解
    Keepalived+LVS实现LNMP网站的高可用部署
    Nginx location相关配置说明
  • 原文地址:https://www.cnblogs.com/java20130726/p/3218430.html
Copyright © 2011-2022 走看看