在jsp 中用js 实现客户端的时间显示
<%@ page language="java" import="java.util.*" pageEncoding="GB18030"%>
<script language="JavaScript">
var timerID = null
var timerRunning = false
function MakeArray(size)
{
this.length = size;
for(var i = 1; i <= size; i++)
{
this[i] = "";
}
return this;
}
function stopclock ()
{
if(timerRunning)
clearTimeout(timerID);
timerRunning = false
}
function showtime ()
{
var now = new Date();
var year = now.getYear();
var month = now.getMonth() + 1;
var date = now.getDate();
var hours = now.getHours();
&nb
补充:Jsp教程,Java基础