Limit the length of TextBox

zhaozj2021-02-16  56

TextBox TextMod for SingleLine can be limited to length restrictions

TextBox TextMod is not good for multiline with maxlength, and you have to use the client's script to do length restrictions.

code show as below:

OnkeyPress = "Return (this.Value.Length <200);" // Input

OnPaste = "Return ((this.Value.Length WINDOW.CLIPBOARDDATA.GETDATA ('Text'). Length) <200);" / / Prevent Paste

转载请注明原文地址:https://www.9cbs.com/read-19846.html

New Post(0)