script language="javascript" type="text/javascript">
function textLimitCheck(thisArea, maxLength, SpanId)
{
if (thisArea.value.length > maxLength)
{
thisArea.value = thisArea.value.substring(0, maxLength);
thisArea.focus();
}
/*回写span的值,当前填写文字*/
var varss='(剩余字数:'+(maxLength-thisArea.value.length)+')';
document.getElementById(SpanId).innerHTML =varss;
}
/script>
asp:TextBox ID="txtOwner_Name" runat="server" Width="250px" MaxLength="50" onkeyup="textLimitCheck(this,50,'spOwner_Name')" BackColor="Info">/asp:TextBox>
span id="spOwner_Name" style="color: gray">em>(50字以内)/em>/span>