$('#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