Article by Joe Burns
Copyright Internet.com All rights reserved.
This article is online:
http://www.htmlgoodies.com/tutorials/forms/article.php/11895_3479201_2
Lose the VALUE Text
Note the text inside the text boxes in the example form; added the attribute VALUE="some text" to the input tag.
Click inside the box:
The "default text" is removed when box is selected/clicked.
Here's the code:
<FORM> <INPUT TYPE="text" VALUE="Default Text" SIZE="45" onFocus="this.value=''"> </FORM>It's JavaScript, when focus is given to the box (onFocus), the value of the box (this.value) is set to nothing. Note the empty quotes at the end of the code; the quotation marks must be used without a space; any space added between quotes, will appear in the form element.
View more tricks ...
- TABINDEX - The Command in Action
- Focus onLoad
- Lose the VALUE Text
Get PLUMB - Blink - In My Arms
Listen to or visit PLUMB at MySpace.com/plumb<< code post


2 comments:
Nice tutorial. I hope you will be adding some more post like this one. This post is relatively new for me and i get some useful information from this post.
Really this post is pretty good.
Post a Comment