Closing popup window after 3 seconds

Use a setTimeout, for example:

var win = window.open("http://www.google.com", '1366002941508','width=500,height=200,left=375,top=330');

setTimeout(function () { win.close();}, 3000);

Sample fiddle: http://jsfiddle.net/N5rve/

Leave a Comment