whisht

    十年

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

2013年4月11日

摘要: 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 阅读(1568) 评论(0) 推荐(0) 编辑