在打開的第二個IE中打開a.htm,然後在第3個打開的頁面中就回丟失!
但是如果只有一個IE的話就不會丟!
3個文件代碼:
a.htm
//add cookie
document.cookie = "testEnableCookie=1";
window.showModalDialog('popWndPJ.htm');//當在第二個IE中打開時會丟失
window.open('popWndPJ.htm');//不會丟失
</script>
popWndPJ.htm
alert(document.cookie);
window.open('Selectlang.htm?ID=1','mytakk',null)
</script>
Selectlang.htm
<script language=javascript>
alert(document.cookie);
</script>
在http://support.microsoft.com/default.aspx?scid=kb;en-us;Q315713 有個說明是說如果關閉了opener窗口才有可能出現.但是這個是一定出現的!