<input type="text" value="搜索内容" onfocus="if(value=='搜索内容') {value='';this.style.color='#333333'}" onblur="if (value=='') {value='搜索内容';this.style.color='#999999'}">
<input type="text" value="搜索内容" onfocus="if(value=='搜索内容') {value='';this.style.color='#333333'}" onblur="if (value=='') {value='搜索内容';this.style.color='#999999'}">
转载于:https://www.cnblogs.com/-CLAY-/p/onblur.html