我正在使用脚本来挂载我的mailto链接并调用默认的电子邮件编辑器。但是由于IE9中的一些错误,我无法使用document.location.href,所以我使用window.open。有用。但我需要关闭打开的IE窗口。Window.open不会返回窗口引用IE9
问题是window.close不返回窗口引用。
function doMailto() {
var sMailto = 'mailto:?bcc=';
sMailto += document.getElementById('<%= txtEmails.ClientID %>').value;
out = window.open(sMailto);
out.close(); //CANT CALL CLOSE, BECAUSE OUT IS NULL
}
可能的复制(与解决方案):http://stackoverflow.com/questions/6100451/ie9-and -self-close – turbo