2010. 3. 22. 16:15

IE 6,7,8 자동으로 창닫기

익스 6,7 파폭에서는

 opener.parent.location.href = url;
 self.close();


이렇게하면 팝업이 닫히고

부모창의 페이지가 변경이됩니다.


IE6 :

window.opener = self; 
self.close(); 
IE7 :
window.open('about:blank','_self').close();
IE8 :
window.opener='Self';
window.open('','_parent','');
window.close();



묻지도 따지지도 않고 닫아준다?




function init(){
window.open('login.action', '', 'top=0,left=0,width='+(screen.availWidth)+',height='+(screen.availHeight)+',fullscreen=no,toolbar=0,location=0,directories=0,status=0,menubar=0,resizable=1,scrolling=0');
if (/MSIE/.test(navigator.userAgent)) {
if(navigator.appVersion.indexOf("MSIE 8.0")>=0) {
window.open('about:blank','_self').close();
} else {
window.opener = self;
self.close();
}
}
}