새창을 띄우고 기존 창을 닫기 위해

window.close(); 함수를 사용하게 되는데 이럴때  지금 보고 있는 창을 닫을지를 확인하는 경고창이 뜬다.

이 경고창을 띄우지 않고 현재 보고 있는 윈도우창을 닫을려고 할때 아래 소스를 사용하면 된다.


window.opener='nothing';

window.open('','_parent','');

window.close();

+ Recent posts