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='(剩余字數(shù):'+(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字以內(nèi))/em>/span>