Posted By

fackz on 04/06/12


show input hide onfocus Onblur

Versions (?)

Who likes this?

2 people have marked this snippet as a favorite


How to show/hide input value on focus

 / Published in: JavaScript

The simplest approach I know.

  1. <input type="text" name="email" class="fmail" value="Email*" onblur="if(value=='') value = 'Email*'" onfocus="if(value=='Email*') value = ''" />

Report this snippet  

You need to login to post a comment.