w = window.open('http://url'); //some operation or event calling w.close();