작성 : 2009-08-13 10:33 조회 : 116
/** * 창닫기 * without : 사파리계열 */ function closeSelf(){ if (/MSIE/.test(navigator.userAgent)) { if(navigator.appVersion.indexOf("MSIE 7.0")>=0 || navigator.appVersion.indexOf("MSIE 8.0")>=0) { //IE7에서는 아래와 같이 window.open('about:blank','_self').close(); } else { //IE7이 아닌 경우 window.opener = self; self.close(); } } else { self.close(); var mywindow = window.open(url) mywindow.close(); window.name = '__t__'; var w = window.open('about:blank'); w.document.open(); w.document.write('<html><body><script type="text/javascript">function _(){var w=window.open("about:blank","'+window.name+'");w.close();self.close();}</'+'script></body></html>'); w.document.close(); w._(); }