var textRange = document.body.createTextRange();
textRange.collapse(true);
if( textRange.findText(tex)) {
textRange.execCommand("BackColor", false, "yellow");
}
The above code is perfect to search for text and highlight it in IE but I want to do a little amendment to count the number of occurrences as well. Like below
textRange.findText(tex).WhichMethod() Should i use to return me count of occurrences.