System Information

Impossible Is Nothing...

导航

用JAVASCRIPT获取服务器时间,并以字符串形式输入,如:200206021943,

<script runat=server language=javascript>
var a = new Date()
a = a.getFullYear() + "" + (a.getMonth() +1) + ""+a.getDate() + ""+a.getHours() + ""+a.getMinutes()
Response.Write(a)
</script>
要用js得到服务器时间,只有服务器脚本支持js,比如Resin才行。

posted on 2005-10-10 06:50  SysInfo  阅读(805)  评论(0编辑  收藏  举报