timeout.jsp

来自「航空自助值机java BS模式程序」· JSP 代码 · 共 88 行

JSP
88
字号
<%@page language="java" session="true" import="fr.ier.cuss.globaldemo.*" %>

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

<html>
<head>
  <%@ include file = "include/header.jsp" %>
  <script language="JavaScript1.2">

  // timeout 
  var timeout = 5000; // 5s

   //------------------------------------------------------------------------
   /**
    * Interccept event
    */
   function processEventBis(event) {
     // Nothing to do
   }

  //--------------------------------------------------------------------------
  /**
   * Init page
   */
  function init2() {
    startTimeoutTimer();
  }

  //--------------------------------------------------------------------------
  /**
   * Start the timeout timer
   */
  function startTimeoutTimer() {
    timeoutTimer = setTimeout("timeoutReached()", timeout);
  }

  //--------------------------------------------------------------------------
  /**
   * Stop the timeout timer
   */
  function stopTimeoutTimer() {
    clearTimeout(timeoutTimer);
  }

  //--------------------------------------------------------------------------
  /**
   * callback function when timeout is reached
   * @return
   */
  function timeoutReached() {
    generateEvent("quit");
  }
  
  </script>
</head>

<body unselectable="on" topmargin="0" bottommargin="0" leftmargin="0" rightmargin="0" OnLoad="javasctip:init();init2()" background="<%= backgroundImageName%>" >

	<table width="100%" height="100%" border="0">
      <thead>
	    <%@ include file = "include/companylogo.jsp" %>
      </thead>
      <!-- =============================================================== -->
      <!--        Body of the table for message                            -->
      <!-- =============================================================== -->
      <tbody>
		<tr>
          <td colspan="4" align="center" height="70%" width="100%" valign="top">
            <h1 class="subTitle">End of session reached.</h1>
            <h1 class="subTitle">Application will stop.</h1>
		  </td>
		</tr>
	  </tbody>
      <!-- =============================================================== -->
      <!--        Foot of the table for buttons                            -->
      <!-- =============================================================== -->
      <tfoot>
        <tr>
            <td height="15%" width="25%" align="center">&nbsp;</td>
            <td width="25%" align="center">&nbsp;</td>
            <td width="25%" align="center">&nbsp;</td>
            <td width="25%" align="center"><%@ include file = "include/quitbutton.jsp" %></td>
        </tr>
      </tfoot>
    </table>
</body>
</html>

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?