jQuery code:
$(function(){ var input = $('input.text'); // input text field var default_value = input.val(); input.focus(function(){ if ($.trim($(input).val()) == default_value) input.val(''); }); input.blur(function(){ if ($.trim($(input).val()) == '') input.val(default_value); }); });
Or use placeholder feature:
<form class="well"> <div class="control-group"> <input type="text" placeholder="placeholder text" /> </div> <div class="control-group"> <textarea placeholder="placeholder text (will disappear after typing)" cols="30" rows="5"></textarea> </div> </form>
Thanks For Your Help ,i was Looking for Something Like this
good job