Specifying maxlength for multiline textbox

后端 未结 19 2065
感动是毒
感动是毒 2020-11-27 15:21

I\'m trying to use asp:


I want a way to spe

19条回答
  •  情歌与酒
    2020-11-27 16:16

    Use a regular expression validator instead. This will work on the client side using JavaScript, but also when JavaScript is disabled (as the length check will be performed on the server as well).

    The following example checks that the entered value is between 0 and 100 characters long:

    *
    

    There are of course more complex regexs you can use to better suit your purposes.

提交回复
热议问题