새창 띄우는 스크립트 > Web Development

본문 바로가기

사이트 내 전체검색

Web Development

새창 띄우는 스크립트

페이지 정보

작성자 규범^-^* 작성일 08-06-19 10:16 조회 1,942 댓글 0 JavaScript

본문



var fileName, intWidth, intHeight;
var screenWidth = screen.availwidth;
var screenHeight = screen.availheight;


if(intWidth >= screenWidth){ //스크린 상태에 따라 스크롤바 자동표시
intWidth = screenWidth - 40;
vScrollbars = 1;
}
if(intHeight >= screenHeight){ //스크린 상태에 따라 스크롤바 자동표시
intHeight = screenHeight - 40;
intWidth = intWidth + 20;
vScrollbars = 1;
}
if(intLeft == 'auto' || intTop == 'auto'){ //스크린 중앙에 위치 시키기
var intLeft = (screenWidth - intWidth) / 2;
var intTop = (screenHeight - intHeight) / 2;
}
var features = eval("'width=" + intWidth + ",height=" + intHeight + ",left=" + intLeft + ",top=" + intTop + ",scrollbars=" + vScrollbars + ",resizable=" + vResizable + ",status=" + vStatus + "'");
if(openF == 1){
if(winname_1.closed){
winname_1 = window.open(fileName,winName,features);
}else{
winname_1.close();
winname_1 = window.open(fileName,winName,features);
}
}else{
winname_1 = window.open(fileName,winName,features);
openF = 1;
}
winname_1.focus();
}
//-->


0 Comments

등록된 댓글이 없습니다.

Copyright ⓒ 2003-2024 LOVELET.COM. All rights reserved.
PC 버전으로 보기