//第一種方法
$(document).ready(function(){
var doc=document,inputs=doc.getElementsBy var doc=document,inputs=doc.getElementsByNameName(' input'),supportPlaceholder='placeholder'in doc.createElement('input'),placeholder=function(input){var text=input.getAttribute('placeholder'),defaultValue=input.defaultValue;
==''){
input.value=text}
input.onfocus=function(){
_U.onfocus=function(){
input.onblur=function(){if(input.value===''){this.value=text}};