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

본문 바로가기
  • kb@lovelet.com
사이트 내 전체검색

RESOURCES Web Development

새창 띄우는 스크립트

페이지 정보

본문



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();
}
//-->


Share Post:

댓글목록

등록된 댓글이 없습니다.

Sign In
OR
Don't have an account? SIGN UP

Keywords

Visits

접속자

Total Visits
1,893,141