【发布时间】:2012-03-23 06:38:52
【问题描述】:
iframe 的属性是 designMode = "on"。
在 Internet Explorer 中使用 @ 按下 iframe 中的某些文本时。
它会自动将其转换为mailto: 链接。
例如ab@cd 变为 mailto:ab@cd
如何取消?
谢谢
【问题讨论】:
标签: internet-explorer iframe mailto designmode
iframe 的属性是 designMode = "on"。
在 Internet Explorer 中使用 @ 按下 iframe 中的某些文本时。
它会自动将其转换为mailto: 链接。
例如ab@cd 变为 mailto:ab@cd
如何取消?
谢谢
【问题讨论】:
标签: internet-explorer iframe mailto designmode
您可以在 IE 9 及更高版本中使用 document.execCommand() (MSDN) 执行此操作:
document.execCommand("AutoUrlDetect", false, false);
现场演示:http://jsfiddle.net/3ELJD/1/
在早期版本的 IE 中,您必须自己删除链接。
【讨论】: