Answers
Sep 16, 2006 - 04:55 PM
There is no html attribute for that, you'll have to use javascript to do it.
You could have a function that would be called on each keypress and then deleting the character pressed if the maximum length was reached.
You could have a function that would be called on each keypress and then deleting the character pressed if the maximum length was reached.
Sep 16, 2006 - 05:23 PM
Ok, thanks.
Something like this?:
150) this.value = this.value.substring(0, 150)">
Jakob
Something like this?:
150) this.value = this.value.substring(0, 150)">
Jakob
Sep 16, 2006 - 05:29 PM
yes, I believe that should work
Sep 16, 2006 - 05:33 PM
It works, though you can cheat it by copy/pasting some content to the field.
(Of course you'll have to use the right-click menu and NOT the CTRL + V shortcut...)
Add the onchange attribute with the same functionality to avoid this exploit.
(Of course you'll have to use the right-click menu and NOT the CTRL + V shortcut...)
Add the onchange attribute with the same functionality to avoid this exploit.
Add New Comment