$('#intent').click(function (e) {
e.preventDefault();
window.open(e.target.href, 'intent', 'width=560,height=520,location=0,resizable=0,scrollbars=0,startus=0,titlebar=0,toolbar=0');
});
在 Internet Explorer 8 中,此代码引发 JavaScript 错误:“调用的对象已与其客户端断开连接。” 代码非常简单。我觉得我以前写过几乎完全一样的东西。我不确定为什么它现在会抛出错误。
这是HTML:
<a href="https://twitter.com/intent/user?screen_name=iancmyers" id="intent">@iancmyers</a>
IE8 调试工具说错误是在 window.open 上抛出的。