jsp显示时间问题

yellow0323 2008-05-21 11:09:31
在jsp如何同步显示当前系统时间???
怎么实现倒计时???
跪求!!!!!!
...全文
166 6 打赏 收藏 转发到动态 举报
写回复
用AI写文章
6 条回复
切换为时间正序
请发表友善的回复…
发表回复
burningice44 2008-05-21
  • 打赏
  • 举报
回复
自己到Google上搜一下
好多的
realcbb 2008-05-21
  • 打赏
  • 举报
回复
楼主搜一下一大把的
zhuyl_wind 2008-05-21
  • 打赏
  • 举报
回复
[Quote=引用 2 楼 kokobox 的回复:]
HTML code
<!doctype html public "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="gb2312">
<head>
<head>
<title> 倒计时效果 </title>
<meta http-equiv="content-type" content="text/html; charset=gb2312" />
<meta name="keywords" content="" />
<meta name="description" content="" />
<script lan…
[/Quote]
siyue_qi 2008-05-21
  • 打赏
  • 举报
回复
支持2楼。
for_cyan 2008-05-21
  • 打赏
  • 举报
回复
有开源的标签,apache的taglibs-datetime好像就可以,试试吧
kokobox 2008-05-21
  • 打赏
  • 举报
回复

<!doctype html public "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="gb2312">
<head>
<head>
<title> 倒计时效果 </title>
<meta http-equiv="content-type" content="text/html; charset=gb2312" />
<meta name="keywords" content="" />
<meta name="description" content="" />
<script language="JavaScript">
<!-- //
var startTime = new Date();
var EndTime=startTime.getTime()+100*60*1000;
function GetRTime(){
var NowTime = new Date();
var nMS =EndTime - NowTime.getTime();
//var nD =Math.floor(nMS/(1000 * 60 * 60 * 24));
var nH=Math.floor(nMS/(1000*60*60)) % 24;
var nM=Math.floor(nMS/(1000*60)) % 60;
var nS=Math.floor(nMS/1000) % 60;
//document.getElementById("RemainD").innerHTML=nD;
document.getElementById("RemainH").innerHTML=nH;
document.getElementById("RemainM").innerHTML=nM;
document.getElementById("RemainS").innerHTML=nS;
if(nMS>5*59*1000&&nMS<=5*60*1000)
{
alert("还有最后五分钟!");
}
setTimeout("GetRTime()",1000);
}
window.onload=GetRTime;
// -->
</script>
</head>
<body>
<div id="CountMsg">倒计时还有:<strong id="RemainD"></strong><strong id="RemainH">XX</strong>时<strong id="RemainM">XX</strong>分<strong id="RemainS">XX</strong>秒</div>
</body>
</html>

81,095

社区成员

发帖
与我相关
我的任务
社区描述
Java Web 开发
社区管理员
  • Web 开发社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧