Button to close window
Closing a window can be done by a visitor to your website, they just click the x in top right of the window. However to make your website easier to use add a close window button or link.
To add this button or link you need to add some web site code called JavaScript [Define], this is a very easy thing to do. Lets make a link that closes a window, copy the code between the below lines into the part of the web page you want to display the “close window”.
_______________________________________________________
<a href="javascript:window.close()" title="click here to close the window">Close window</a>
_______________________________________________________
It will look like this on your website
Close window
(This doesn’t work here because it would close this window, which you don’t want to do)
To add this code to your website you need to need to view the HTML [Define] of the web page you are working on. If you use software like Dreamweaver or Frontpage, find the option that allows you to see the “code” or “source”. If you have trouble finding this, search the help menu for “Edit html”.
More web design advice
To add this button or link you need to add some web site code called JavaScript [Define], this is a very easy thing to do. Lets make a link that closes a window, copy the code between the below lines into the part of the web page you want to display the “close window”.
_______________________________________________________
<a href="javascript:window.close()" title="click here to close the window">Close window</a>
_______________________________________________________
It will look like this on your website
Close window
(This doesn’t work here because it would close this window, which you don’t want to do)
To add this code to your website you need to need to view the HTML [Define] of the web page you are working on. If you use software like Dreamweaver or Frontpage, find the option that allows you to see the “code” or “source”. If you have trouble finding this, search the help menu for “Edit html”.
More web design advice
0 Comments:
Post a Comment
<< Home