Want to know when there are new posts?

SUBSCRIBE VIA EMAIL

SUBSCRIBE VIA RSS

Tagged: ‘On Click’

Sep 13th

Clear Text On Input Field On Click

Ever wanted to add text to your input fields and have it disappear when your visitor starts adding their info?

Better still, have it reappear if the visitor adds nothing?

Like this:

Here’s the code:

<input type="text" name="field-name-here" onclick="this.value='';" onfocus="this.select()" onblur="this.value=!this.value?'Enter Email To Get Updates':this.value;" value="Enter Email To Get Updates" />

Replace Enter Email To Get Updates with your own text.

Just a simple technique which works great.

9 Comments Subscribe To RSS Feed

Topics: Code

MiniSitePacks.com

High Quality Professional Minisite Templates For Only $7

This is a complete solution! We're Talking Full Blown Graphics--From Top To Bottom--At A FRACTION Of What You Would Pay A Designer! Find out more.