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

  • 相关阅读:
    vue 开发环境搭建
    签名算法
    MySQL explain执行计划优化
    查看运行时某个java对象占用JVM大小及通过idea查看java的内存占用情况
    jenkins 配置
    CSS布局
    《JavaScript 代码优化指南》
    JavaScript 跨域漫游
    iFrame 功能详解
    粘性的底部布局
  • 原文地址:https://www.cnblogs.com/java20130726/p/3218430.html
Copyright © 2011-2022 走看看