日期:2014-05-16 浏览次数:20489 次
mshtml.IHTMLDocument2 document = (mshtml.IHTMLDocument2)webbrowser1.Document.DomDocument; IHTMLBodyElement body = (IHTMLBodyElement)document.body; IHTMLTxtRange searchRange = (IHTMLTxtRange)body.createTextRange(); //...... string find = searchRange.text.Substring(x, y); if (searchRange.findText(find, 0, 0)) { searchRange.select(); }