Edit [30.01.12]: Turns out I got something wrong. I’ve updated the code below to fix this. Note, I’ve only tested this with input and textareas!

I originally found this code here but it didn’t support textareas, so I’ve added that in.

Just add this javascript to your site, and then the following CSS to your stylesheet.

 
$(function() {
     if(!$.support.placeholder) {
          var active = document.activeElement;
          $('textarea').each(function(index, element) {
           if($(this).val().length == 0) {
               $(this).html($(this).attr('id')).addClass('hasPlaceholder');
               }
        });
          $('input, textarea').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');
                    //$(this).css('background', 'red');
               }
          });
          $(':text').blur();
          $(active).focus();
          $('form').submit(function () {
               $(this).find('.hasPlaceholder').each(function() { $(this).val(''); });
          });
     }
}); 

Add to your stylesheet

.hasPlaceholder {
     color: #aaa;
}