<script language="javascript">
var currentDate = new Date(<%=new java.util.Date().getTime()%>);
function run() {
currentDate.setSeconds(currentDate.getSeconds() + 1);
document.getElementById("currentTime").innerHTML = currentDate.toLocaleString();
}
window.setInterval("run();", 1000);
</script>
<div id="currentTime"></div>
标签:function,动态显示,run,setSeconds,getSeconds,Jsp,currentDate,服务器 From: https://blog.51cto.com/u_6174294/6207193