Answers for "how to set word limit in textarea in javascript"

3

css textarea limit

<textarea maxlength="20"></textarea>

<!-- limits the maximum input length up to 20 characters -->
Posted by: Guest on June-24-2020
0

hi;ight word in textarea javascript

$(function(){
  $("#search").click(function(){
    var area   = $('#test');
    var findWord = "rhoncus";
    var index = area.val().indexOf(findWord);
    area.focus().prop({'selectionStart': index, 'selectionEnd': index+findWord.length})          
  })
})
Posted by: Guest on February-15-2021

Code answers related to "how to set word limit in textarea in javascript"

Browse Popular Code Answers by Language