팝업창 오늘 하루 안뜨기 소스좀 가르켜 주세요 정보
팝업창 오늘 하루 안뜨기 소스좀 가르켜 주세요본문
팝업창 띄울때 오늘하루 안뜨기 소스랑 적용 방법좀 가르켜 주세요 ㅠㅠ
잘 안되네요
추천
3
3
댓글 2개
<script>
(function() {
var pop = [
['test2.html','name1','width=200,height=200'],
['test2.html','name2','width=200,height=200']
]
function _disablePop(win) {
var expires = new Date();
var name = win.name;
expires.setDate(expires.getDate()+1);
expires = expires.toGMTString();
cookies = '_aequum_'+name+'=ung ; path=/ ;expires=' + expires + ';';
document.cookie = cookies;
win.close();
}
function _checkPop() {
for (var i=0 ; i < pop.length; i++) {
var name = '_aequum_' + pop[i][1];
if (document.cookie.indexOf(name) > -1 ) continue
else window.open(pop[i][0],pop[i][1],pop[i][2])
}
}
window._disablePop = _disablePop;
_checkPop();
})();
</script>
작성해봤어요. 위와 같은 소스를 본래 창에 넣고요
팝업창 닫기 버튼은 해당 팝업창에서
<span onclick="opener._disablePop(self);">
하루창닫기
</span>
이런식으로 넣으면 됩니다.
좀 급조한 맛이? 다시 화면에 뛰우고 싶으면 브라우저 쿠키를 지우면 됩니다.
(function() {
var pop = [
['test2.html','name1','width=200,height=200'],
['test2.html','name2','width=200,height=200']
]
function _disablePop(win) {
var expires = new Date();
var name = win.name;
expires.setDate(expires.getDate()+1);
expires = expires.toGMTString();
cookies = '_aequum_'+name+'=ung ; path=/ ;expires=' + expires + ';';
document.cookie = cookies;
win.close();
}
function _checkPop() {
for (var i=0 ; i < pop.length; i++) {
var name = '_aequum_' + pop[i][1];
if (document.cookie.indexOf(name) > -1 ) continue
else window.open(pop[i][0],pop[i][1],pop[i][2])
}
}
window._disablePop = _disablePop;
_checkPop();
})();
</script>
작성해봤어요. 위와 같은 소스를 본래 창에 넣고요
팝업창 닫기 버튼은 해당 팝업창에서
<span onclick="opener._disablePop(self);">
하루창닫기
</span>
이런식으로 넣으면 됩니다.
좀 급조한 맛이? 다시 화면에 뛰우고 싶으면 브라우저 쿠키를 지우면 됩니다.
와우 감사합니다... 해봐야하겠지만~~~~
저같은 prg 쑥맥도 가능할까여?
------------------------------
해봤는데, 액티브x 허용 이런게 나오는데,
이건 어쩔수 없는건가용?
저같은 prg 쑥맥도 가능할까여?
------------------------------
해봤는데, 액티브x 허용 이런게 나오는데,
이건 어쩔수 없는건가용?