<script type="text/javascript">
function checkLength(which,lb) {
    var maxChars = 312; //
    if (which.value.length > maxChars)
    {
        // 超过限制的字数了就将 文本框中的内容按规定的字数 截取
        which.value = which.value.substring(0,maxChars);
        return false;
    }
    else
    {
        var curr = maxChars - which.value.length; //250 减去 当前输入的
       // alert(document.getElementById("sy"));
       if(lb==1)
       {
        document.getElementById("tabID_tabpID_ctlxswxInfo1_sy").innerHTML = curr.toString();
        }
         else if(lb==2)
       {
        document.getElementById("tabID_tabpID_ctlxswxInfo1_sgfasy").innerHTML = curr.toString();
        }
        return true;
    }
}
</script>

<asp:TextBox ID="txtsgfa" runat="server" onkeyup="checkLength(this,2);" TextMode="MultiLine"  MaxLength="312" Width="100%" Height="100%"></asp:TextBox>

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2022-01-20
  • 2022-12-23
  • 2021-12-15
  • 2022-12-23
  • 2021-10-14
相关资源
相似解决方案