Var unsubscribeStr: string;
OvSelection: OleVariant;
OvTextRange: OleVariant;
OvSelection:=Edit OleObject. Document. Selection;//get a selection object
OvSelection. The Clear;
OvTextRange:=ovSelection. CreateRange;//create a TextRange from the current selection
OvTextRange. PasteHTML (unsubscribeStr);//insert the source, is the content of the unsubscribeStr & lt; A href="mailto: * * * for privacy reason to delete email address * * * & gt; * * * & lt;/A>
Above in IE 11 previous versions can win 10 has just launched 11 IE version can also, will win 10 recently upgraded to the latest version, IE 11 also upgrade to the latest version, the above code is invalid,
Later after the test, pasteHTML function can insert & lt; A href="http://www." * * * & gt; * * & lt;/A> , that is, can be inserted into the HTTP, HTTPS, FTP, Telnet connection, but you can't insert mailto, news, links, when inserted into the mailto link, will automatically be mailto link, leaving only & lt; A> * * * & lt;/A>
CodePudding user response:
I also have said the trapped, IE11 as INNERHTML insert images do not move, can move, after refreshIE6 and other normal version, security OR IE11 BUG?