Monday, April 18, 2011

Create Informative Textboxes

http://blog.jbstrickler.com/2010/06/create-informative-textboxes/comment-page-1/Create more informative textboxes by placing descriptive information, or “infotips”, about the textbox directly inside of it. This is particularly useful when it is not always desired to place labels next to textboxes such as in a small log in form. Example, Facebook’s log-in page places text inside its fields rather than using labels. When one of the textboxes receives focus, the text disappears; on blur, if nothing is entered then the infotip is placed back.

or another way is-
onFocus="if(this.value == 'location') {this.value = '';}" 
onBlur="if (this.value == '') {this.value = 'location';}"


Source: http://blog.jbstrickler.com/2010/06/create-informative-textboxes/comment-page-1/


Facebook Log in Snapshot

No comments:

Post a Comment