<input type="text" value="请输入职位或公司" onfocus="this.style.color=‘#666‘; if(this.value==‘请输入职位或公司‘) this.value=‘‘" onblur="this.style.color=‘#ccc‘; if(this.value==‘‘) this.value=‘请输入职位或公司‘" />
搜索框的点击事件
原文:http://www.cnblogs.com/-lijun/p/5300106.html