faqts : Computers : Programming : Languages : JavaScript : Windows

+ Search
Add Entry AlertManage Folder Edit Entry Add page to http://del.icio.us/
Did You Find This Entry Useful?

103 of 113 people (91%) answered Yes
Recently 10 of 10 people (100%) answered Yes

Entry

How can I close a window after a certain amount of time?

Mar 1st, 2000 18:12
Martin Honnen,


Use setTimeout for such task
  setTimeout('js code here', delayInMilliseconds)
thus
 <BODY ONLOAD="setTimeout('window.close()', 5000);">
will close the window 5 seconds after it is completely loaded.