IE6 IE7 丢失cookie的bug!

在打开的第二个IE中打开a.htm,然后在第3个打开的页面中就回丢失!

但是如果只有一个IE的话就不会丢!

3个文件代码:

a.htm

<script language=javascript>
//add cookie
document.cookie = "testEnableCookie=1";

window.showModalDialog(
'popWndPJ.htm');//当在第二个IE中打开时会丢失
window.open('popWndPJ.htm');//不会丢失
</script>

popWndPJ.htm

<script language=javascript>
  alert(document.cookie);
       window.open(
'Selectlang.htm?ID=1','mytakk',null)
  
</script>

Selectlang.htm

My cookie???
<script language=javascript>
alert(document.cookie);
</script>

 在http://support.microsoft.com/default.aspx?scid=kb;en-us;Q315713 有个说明是说如果关闭了opener窗口有可能出现.但是这个是一定出现的!

原文地址:https://www.cnblogs.com/huigll/p/1993600.html