This will produce a text link that, when clicked, will close the current browser window:
- Code: Select all
<a href="javascript:self.close()">Close the window</a>
produces:
Close the window (in text format)
If the current window is the original window opened by the user, the user will see a prompt asking whether it's ok to close the window.
Here's another one that works w/ a button instead of text:
- Code: Select all
<INPUT Type="button" Value="Close Window" onClick="window.close();">
