$('#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错误:“调用的对象已与其客户端断开连接。代码非常简单。我觉得我已经写了一些几乎完全像这样的东西。我不知道为什么它现在抛出一个错误。JavaScript错误:IE8中的window.open中的“调用的对象与客户端断开连接”
这里的HTML:
<a href="https://twitter.com/intent/user?screen_name=iancmyers" id="intent">@iancmyers</a>
IE8的调试工具说被扔在window.open错误。
什么是intent元素?你可以发布HTML吗? – jbabey 2012-04-19 19:35:26