JWorld@TW the best professional Java site in Taiwan
      註冊 | 登入 | 全文檢索 | 排行榜  

» JWorld@TW » Servlet/JSP 討論區  

按列印兼容模式列印這個話題 列印話題    把這個話題寄給朋友 寄給朋友   
reply to topicthreaded modego to previous topicgo to next topic
本主題所含的標籤
無標籤
作者 JSP怎麼做到類似timer的功能.. [精華]
Egn



發文: 0
積分: 0
於 2003-06-04 11:23 user profilesend a private message to userreply to postreply to postsearch all posts byselect and copy to clipboard. 
ie only, sorry for netscape users:-)add this post to my favorite list
請問一下,我現在想要類似Vb的timer一樣的工能,在時間到後會做某些事,
請問要怎麼做阿.我用while迴圈去計數,結果整個程式就當在那邊ㄝ..


reply to postreply to post
作者 Re:JSP怎麼做到類似timer的功能.. [Re:Egn]
hambking





發文: 39
積分: 2
於 2003-06-04 14:19 user profilesend a private message to userreply to postreply to postsearch all posts byselect and copy to clipboard. 
ie only, sorry for netscape users:-)add this post to my favorite list
ㄟ..這個可能要問清楚.....

是要顯現一個像小時鐘的時間,還是要特定時間之後,可以轉到其他頁之類的動作......

如果是要特定時間做特定動作,其實用javascript有可以做到喔....

端看您的需求以及動作...

如果可以描述的更清楚,板上的大大才可以幫你囉SmileSmile


reply to postreply to post
作者 Re:JSP怎麼做到類似timer的功能.. [Re:Egn]
Egn



發文: 0
積分: 0
於 2003-06-05 21:47 user profilesend a private message to userreply to postreply to postsearch all posts byselect and copy to clipboard. 
ie only, sorry for netscape users:-)add this post to my favorite list
對不起..我沒給他說的很清楚...是要特定時間後轉到其他網頁...請問用javascript怎麼血阿...有人能提供程式教我嗎...謝謝

reply to postreply to post
作者 Re:JSP怎麼做到類似timer的功能.. [Re:Egn]
koji

秒速5センチメートル

站長

發文: 8415
積分: 19
於 2003-06-06 00:50 user profilesend a private message to userreply to postreply to postsearch all posts byselect and copy to clipboard. 
ie only, sorry for netscape users:-)add this post to my favorite list
Egn wrote:
對不起..我沒給他說的很清楚...是要特定時間後轉到其他網頁...請問用javascript怎麼血阿...有人能提供程式教我嗎...謝謝


我記得response.setHeader(header,value);
可以用
譬如
response.setHeader ("Refresh", "120; URL='AAA.jsp'");
試試看,手邊資料剛好不在

good luck

koji


reply to postreply to post
作者 Re:JSP怎麼做到類似timer的功能.. [Re:Egn]
rainman





發文: 67
積分: 1
於 2003-06-07 04:55 user profilesend a private message to userreply to postreply to postsearch all posts byselect and copy to clipboard. 
ie only, sorry for netscape users:-)add this post to my favorite list
webapp的web.xml注册一个StartOnLoad的Servlet/JSP,在这个Servlet里使用java.util.Timer and java.util.TimerTask来定时工作。

reply to postreply to post
作者 Re:JSP怎麼做到類似timer的功能.. [Re:rainman]
browser

戀香

版主

發文: 3570
積分: 1
於 2003-06-09 20:17 user profilesend a private message to usersend email to browserreply to postreply to postsearch all posts byselect and copy to clipboard. 
ie only, sorry for netscape users:-)add this post to my favorite list
rainman wrote:
webapp的web.xml注册一个StartOnLoad的Servlet/JSP,在这个Servlet里使用java.util.Timer and java.util.TimerTask来定时工作。


下面為參考資料:

http://www.javaresearch.org/article/showarticle.jsp?column=331&thread=4857


reply to postreply to post
» JWorld@TW »  Servlet/JSP 討論區

reply to topicthreaded modego to previous topicgo to next topic
  已讀文章
  新的文章
  被刪除的文章
Jump to the top of page

JWorld@TW 本站商標資訊

Powered by Powerful JuteForum® Version Jute 1.5.8