javascript get textarea content code example
Example 1: 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})
})
})
Example 2: javascript find textarea
if(document.getElementsByTagName('textarea').length > 0) {
}