팝업창 질문입니다 정보
팝업창 질문입니다
본문
function openPopup()
{
var noticeCookie=getCookie("news1"); // 쿠키변수 이름
if (noticeCookie != "no")
window.open('/pop/b.htm','pop1','width=400,height=325,top=50,left=150');
// window.open('팝업창 웹페이지','윈도우명','width=350,height=400,top=50,left=150');
}
openPopup(); //팝업 띄우기
이렇게 하면 정상적으로 팝업이 뜨는데..
두개 뜨게 하려면 어떻게 수정을 해야하나요.? ㅠㅠ
{
var noticeCookie=getCookie("news1"); // 쿠키변수 이름
if (noticeCookie != "no")
window.open('/pop/b.htm','pop1','width=400,height=325,top=50,left=150');
// window.open('팝업창 웹페이지','윈도우명','width=350,height=400,top=50,left=150');
}
openPopup(); //팝업 띄우기
이렇게 하면 정상적으로 팝업이 뜨는데..
두개 뜨게 하려면 어떻게 수정을 해야하나요.? ㅠㅠ
댓글 전체

function openPopup(name)
{
var noticeCookie=getCookie(name); // 쿠키변수 이름
if (noticeCookie != "no")
window.open('/pop/'+name+'.htm',name,'width=400,height=325,top=50,left=150');
// window.open('팝업창 웹페이지','윈도우명','width=350,height=400,top=50,left=150');
}
openPopup('a'); //팝업 띄우기
openPopup('b');
/pop/ 폴더에 a.htm 파일과 b.htm 파일을 만들어주셔야 합니다.
{
var noticeCookie=getCookie(name); // 쿠키변수 이름
if (noticeCookie != "no")
window.open('/pop/'+name+'.htm',name,'width=400,height=325,top=50,left=150');
// window.open('팝업창 웹페이지','윈도우명','width=350,height=400,top=50,left=150');
}
openPopup('a'); //팝업 띄우기
openPopup('b');
/pop/ 폴더에 a.htm 파일과 b.htm 파일을 만들어주셔야 합니다.