whisht

    十年

  博客园 :: 首页 :: 新随笔 :: 联系 :: 订阅 :: 管理 ::

04 2013 档案

摘要:C#做浏览器,需要获取当前网页选中的内容具体方法 引用--》COM--》Microsoft HTML Object Library代码:using mshtml; IHTMLDocument2 document = (IHTMLDocument2)web.Document.DomDocument; IHTMLTxtRange htmlElem = (IHTMLTxtRange)document.selection.createRange(); string text = htmlElem.text; //选中的文字内容 阅读全文
posted @ 2013-04-11 17:48 WHISHT 阅读(1580) 评论(0) 推荐(0)