자바스크립트 문의입니다. > 그누4 질문답변

그누4 질문답변

그누보드4 관련 질문은 QA 로 이전됩니다. QA 그누보드4 바로가기
기존 게시물은 열람만 가능합니다.

자바스크립트 문의입니다. 정보

자바스크립트 문의입니다.

본문

self.close();
 
window.close();
 
이 두개가 먹히지 않는 이유가 멀까요?
 
즉 이 두개의 스크립트를 써도 이상하게 창이 닫기지 않습니다.
 
  • 복사

댓글 전체

이렇게 사용했습니다.

var width=screen.width;
var height=screen.height-50;

window.open('../index.html', '','width='+width+',height='+height+',location=yes,scrollbars=yes,resizable=yes,status=yes,menubar=yes,toolbar=yes,top=0,left=0');
self.close();

제가 구현할려는 것은 새창으로 페이지를 열고 자신은 닫게 하고 싶습니다.
<script language='Javascript'>
function select_new() {
    var width=screen.width;
    var height=screen.height-50;
    var new_win = window.open('../index.html', '','width='+width+',height='+height+',location=yes,scrollbars=yes,resizable=yes,status=yes,menubar=yes,toolbar=yes,top=0,left=0');

    window.close();
    return false;
}
</script>

<a href='javascript:;' onclick="select_new();">새창은열고 현재창은 닫기</a>


이렇게 해보세요.......^^
© SIRSOFT
현재 페이지 제일 처음으로