• home
  • forum
  • my
  • kt
  • download
  • Close Window

    Author: 2007-08-08 09:56:55 From:

    Ever want to place a link or button on your page that will close the window to make it easier on the user? Well
    heres a quick and easy way to do just that.
    Heres the code to close a regular window using a text link. Just paste it where you want the link and change the
    title of the link.

    <a href="javascript:window.close()">Close</a>
    Now heres a way to close the window by clicking on a image, whether it's a picture or a button you made yourself.

    <a href="javascript:window.close()">
    <img border="0" src="close.gif" width="50" height="50">
    </a>
    Heres the third and final method, this one closes the window when you click on a button.

    <form>
    <input type="button" value="Close" onClick="window.close()">
    </form>

    discuss this topic to forum

    relation tutorial

    No relevant information

    Category

      AJAX (20)
      Content Management (7)
      Cookies (4)
      Date and Time (12)
      Development (7)
      DHTML (14)
      Forms (8)
      Frequently Asked Questions (1)
      Image Display (9)
      Introduction to Javascript (5)
      Links and Buttons (4)
      Menus (2)
      Miscellaneous (5)
      Mouse Tricks (3)
      Navigation (8)
      Randomizing (4)
      Security (1)
      Text Effects (6)
      User Authentication (2)
      User Information (5)
      Windows and Frames (3)

    New

    Hot