크롬 (Chrome) Window.Close(), 팝업창 닫히지 않을 때 해결

반응형

익스플로러에서는 동작하는 window.close() 함수를 크롬에서 테스트 했을 때 팝업창이 닫히지 않습니다.

크롬에서 scripts may close only the windows that were opened by it. 오류 메세지

 

사용 함수

function close(){
   window.open('', '_self', '');
   window.close();
   return false;
}
반응형