Posted in Javascript onJuly 10, 2013
<script type="text/javascript"> function txtFocus(el) { if (el.defaultValue == el.value) { el.value = ''; el.style.color = '#000'; } } function txtBlur(el) { if (el.value == '') { el.value = el.defaultValue; el.style.color = '#666'; } } </script> <asp:TextBox ID="txtBookPerson" runat="server" CssClass="text2" style="color:#666;" onfocus="txtFocus(this)" onblur="txtBlur(this)" value='请输入预定人' ></asp:TextBox>
JS文本框默认值处理详解
声明:登载此文出于传递更多信息之目的,并不意味着赞同其观点或证实其描述。
Reply on: @reply_date@
@reply_contents@