1$(function(){
2 $("#search").click(function(){
3 var area = $('#test');
4 var findWord = "rhoncus";
5 var index = area.val().indexOf(findWord);
6 area.focus().prop({'selectionStart': index, 'selectionEnd': index+findWord.length})
7 })
8})
9