代码 <scripttype="text/javascript">
functiontxtFocus(el){
if(el.defaultValue==el.value){el.value='';el.style.color='#000';}
}
functiontxtBlur(el){
if(el.value==''){el.value=el.defaultValue;el.style.color='#666';}
}
</script>
<asp:TextBoxID="txtBookPerson"runat="server"CssClass="text2"style="color:#666;"onfocus="txtFocus(this)"onblur="txtBlur(this)"value='请输入预定人'></asp:TextBox>