Summary of Content |
This little JavaScript will enable you to display some example default text within a text box that will disappear when clicked on. Using the Onfocus tag. All it does is save a manual clearing of the initial text, but its that little bit of extra consideration for the user. |
Default Form Text that Disappears with mouse on focus | ||
Example: Place your mouse pointer over the text box.
Place your form code within your HTML like this:
Change the web address indicated in red to your form address. If you'd like to change the default text displayed within your text box, make sure you change it in both the JavaScript code and your form code as indicated in bold. |
Hyperlink titles have been abbreviated, (right click on the link and select properties for the full URL)
Double mouse click anywhere on the page to take you back to the top (except when over the links)
Last Update: 13/02/2008 - Web Forms - Disappearing Default Form Text - Neils Resource Web