本文整理自网络,侵删。
var unsubscribeStr : string; ovSelection: OleVariant; innerDom, ovTextRange, nnode: OleVariant;begin ovSelection := Edit.doc.selection; //获得选择对象 ovTextRange := ovSelection.createRange; // create a TextRange from the current selection if SameText(ovTextRange.parentElement.tagName, 'a') then begin //是链接,在这里进行处理 ovTextRange.parentElement.outerHtml; //链接的完整 HTML end;end;
相关阅读 >>
Delphi twebbrowser出现 method pastehtml not supported by automation object 解决方法
Delphi andorid应用程序检查wifi有效还是无效
Delphi 执行一个外部程序,当外部程序结束后言主程序立即响应
更多相关阅读请进入《Delphi》频道 >>