如何检测当前IE是否开启了弹出窗口阻止程序?
问题是这样的,我在程序中有两个地方会调用showModalDialog 
 1.如果是鼠标点页面上的图片来调用的话,弹出窗口会正常显示 
 2.另外还有一个快捷方式,可以通过按键onkeypress来调用,但是在IE7   或者某些开启了禁止弹出窗口的IE6下会报告脚本错误。我希望通过查当前窗口所否被阻止,然后告诉用户把当前站点设置到可弹出窗口的信任站点中去,通过Js可以做到吗?不能给用户看到脚本错误,最好是能检测当前窗口被禁止后给出友好提示。 
------解决方案--------------------先尝试弹出,然后等若干毫秒,看看弹出窗口对象是否变为null了,如果是那么就是被关闭了。
------解决方案--------------------去看webmessenger.msn.com上面的脚本
------解决方案--------------------1.html   
  <html>  
  <body>  
  <script>  
 var url =  "2.html ";		//测试弹出窗口页面   
 var handle = null; 
 try { 
 	handle = window.open(url,  " ",  " ") 
 } catch (e) { 
 } 
 if (handle==null) 
 	alert( "IE已禁止弹出窗口 ");   
 var returnValue = null; 
 try { 
 	//注意url指定页面应返回值, 例: <body onunload= "window.returnValue= 'aaa ' ">  
 	returnValue = window.showModalDialog(url,  " ",  " ") 
 } catch (e) { 
 } 
 if (returnValue==null) 
 	alert( "IE已禁止弹出窗口 "); 
  </script>  
  </body>  
  </html>    
 2.html 
  <html>  
  <body onunload= "window.returnValue= 'aaa ' ">  
 	aaaa 
  </body>  
  </html>