This set of short, easy scripts shows six different ways to close a window from JavaScript, including closing windows from a clicked link, a clicked image, or a clicked form button. Special instructions are also included for closing windows comprised of frameset pages.
This perl/javascript combination opens an exit popup window on a web page exit in background, randomly selects a website out of a customizable pool of URLs and displays it in this popup.