【发布时间】:2012-01-26 14:17:26
【问题描述】:
我正在使用脚本来挂载我的 mailto 链接并调用默认的电子邮件编辑器。但是由于IE9中的一些错误,我不能使用document.location.href,所以我使用window.open。有用。但是我需要关闭打开的 IE 窗口。
问题是 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
}
【问题讨论】:
标签: javascript asp.net reference internet-explorer-9 window.open