TextBox TextMod为SingleLine 可用MaxLength可以为长度限制
TextBox TextMod为MultiLine 用MaxLength就不好使了,得用客户端的脚本来做长度限制
代码如下:
onKeyPress="return ( this.value.length < 200 );" //输入
onPaste="return (( this.value.length +window.clipboardData.getData('Text').length) < 200 );"//防止粘贴

相关文章:

  • 2021-05-20
  • 2021-12-01
  • 2022-12-23
  • 2021-11-07
  • 2022-01-20
  • 2021-11-28
  • 2021-11-05
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-10-07
  • 2021-05-23
  • 2022-12-23
相关资源
相似解决方案