##################################################################################
// 오픈윈도우를 띄울때
// 호출 방법 : setOpenwin(주소,창이름,창넓이,창높이,스크롤여부)
// 입력 파라메터: winl-윈도우 가로중앙점, wint- 윈도우 세로 중앙점
// ##################################################################################
function setOpenwin(url,winnm,width,height,scroll)
{
var winl = (screen.width-width)/2;
var wint = (screen.height-height)/2;
var settings ='height='+height+',';
settings +='width='+width+',';
settings +='top='+wint+',';
settings +='left='+winl+',';
settings +='scrollbars='+scroll+',';
settings +='toolbar=no,location=no,directories=no,status=no,resizable=no,menubar=no,copyhistory=no';
win = window.open(url,winnm,settings);
if (!win)
alert('차단된 팝업창을 허용해 주세요.');
else{
win.window.resizeTo(width,height);
if(parseInt(navigator.appVersion) >= 4){win.window.focus();}
}
}
'개발팁( Javascript )' 카테고리의 다른 글
jsonp에 대한 간단한 사용법 (0) | 2014.03.21 |
---|---|
SNS연결 스크립트 (0) | 2013.07.15 |
비밀번호의 휴효성을 체크 스크립트 (0) | 2013.07.09 |
메일 주소 체크 정규 표현식 (0) | 2013.07.09 |
ID의 유효성을 체크한다. (0) | 2013.07.02 |