SyntaxFix
Write A Post
Hire A Developer
Questions
Try using jQuery to avoid cross browser compatibility problems...
$("textarea").keyup(function(){ if($(this).text().length > 500){ var text = $(this).text(); $(this).text(text.substr(0, 500)); } });