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放入 就是方法名

  • 相关阅读:
    关于nginx稳定版1.20.1 4层负载 stream模块失效
    Docker 容器内分析 java程序占用 cpu 高问题排查分析
    分组排序查第一第二的差值
    【album】语音合成技术
    8.juery
    7.dom
    6.对象
    5.函数
    4.数组
    3.JS
  • 原文地址:https://www.cnblogs.com/java20130726/p/3218430.html
Copyright © 2011-2022 走看看