`
robinsoncrusoe
  • 浏览: 737471 次
  • 性别: Icon_minigender_2
  • 来自: 深圳
社区版块
存档分类
最新评论

Jsp 动态显示系统时间

    博客分类:
  • JAVA
阅读更多

<%@ page language="java" import="java.util.*,java.sql.*,com.abin.db.connection.*,java.text.*,com.abin.test.connection.*" pageEncoding="utf-8"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <title>Javascript time</title>
    <meta http-equiv="Refresh" content="1" url="">
  </head>
<script type="text/javascript">


</script>
  <body >
	<div id="it" ></div>
	<br/>
	<span id="its"></span>
	<br/>
	jsp时间
	<%
	Timestamp time=new Timestamp(System.currentTimeMillis());
	out.println(time.toString());
	 %>
  </body>
</html>










<meta   http-equiv= "Refresh "   content= "1 "   url= " "> //加入 <head> </hean> 之间

<%
Timestamp   time   =   new   Timestamp(System.currentTimeMillis());
out.println(time.toString());
%> 


分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics