<script type="text/javascript"> $(function() { if (!$.support.placeholder) { var active = document.activeElement; $(':text').focus(function() { if ($(this).attr('placeholder') != '' && $(this).val() == $(this).attr('placeholder')) { $(this).val('').removeClass('hasPlaceholder'); } }).blur(function() { if ($(this).attr('placeholder') != '' && ($(this).val() == '' || $(this).val() == $(this).attr('placeholder'))) { $(this).val($(this).attr('placeholder')).addClass('hasPlaceholder'); } }); $(':text').blur(); $(active).focus(); } }); </script>
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)