supportPlaceholder.js
var supportPlaceHolder = function() {
// first, detect the placeholder attribute
var isPlaceholder = function(){
var input = document.createElement('input');
return 'placeholder' in input;
}
if(!isPlaceholder()){
$('[placeholder]').each(function(){
var defaultValue = $(this).attr("placeholder");
if($.trim($(this).val())==""){
$(this).val(defaultValue).css("color","#999");
}
$(this).focus(function(){
var defaultValue = $(this).attr("placeholder");
if($.trim($(this).val())==defaultValue){
$(this).val("").css("color","#333");
}
}).blur(function(){
var defaultValue = $(this).attr("placeholder");
if($.trim($(this).val())==""){
$(this).val(defaultValue).css("color","#999")
}
});
})
}
}