0
I have the following code snippet :
@Html.TextAreaFor(model => model.men_mensagem, new { @cols = Model.Men_caracteres, @rows = Model.Men_linha })
I define the number of lines, but that’s just for display, right? I would like to limit, ex: finished line 6, can not type anything else, as if it were a maxLength
, only instead of characters, limit by line. Is there any way to do this?
the element
textarea
no support for this, need to do with javascript. using some event, typekeypress
,keydown
, etc and count the lines to limit– Ricardo Pontual
Gee, that’s too bad, it seems a bit complicated kk, but I’ll try, thank you
– Jeff Henrique
Do you know any element that supports this?
– Jeff Henrique
does not exist, but you can use javascript for this... see the example below I put
– Ricardo Pontual