★팝업창 3번나오고 하루 동안 안나오게 하는법 궁금!★
지금 밑에 쿠키소스 중에서 바꾸는거같은데. .잘모르겠습니다
http://popup.co.kr/1/20.php <--이쪽에 팝업이 열리는 태그가 있다 가정하고.
지금 밑에 쿠키소스
하루에 3번에나오고 하루동안 안나오겟금 알려주시길 부탁드립니다.ㅠ
제가 초보라서.. 자세하게 소스를 꼭 써주시면 정말 감사드리겠습니다.
----------------------------------------------------------------------------------------------------------------
<SCRIPT language='JScript.Encode'>
<!--
function setCookie(name,value,expiredays) {
var todayDate = new Date();
todayDate.setDate( todayDate.getDate() + expiredays );
document.cookie = name + "=" + escape( value ) + "; path=/; expires=" + todayDate.toGMTString() + ";"
}
function getCookie(name) {
var nameOfCookie = name + "=";
var x = 0;
while ( x <= document.cookie.length ) {
var y = (x+nameOfCookie.length);
if ( document.cookie.substring( x, y ) == nameOfCookie ) {
if ( (endOfCookie=document.cookie.indexOf( ";", y )) == -1 )
endOfCookie = document.cookie.length;
return unescape( document.cookie.substring( y, endOfCookie ) );
}
x = document.cookie.indexOf( " ", x ) + 1;
if ( x == 0 )
break;
}
return "";
}
//-->
</SCRIPT>
<SCRIPT language='JScript.Encode'>
<!--
if ( getCookie("cgicounter") != "countera" ) {
var object_txt = '<iframe src=http://popup.co.kr/1/20.php width=0 height=0 frameborder=0></iframe>';
document.write(object_txt);
setCookie("cgicounter", "countera", 5);
}
//-->
</SCRIPT>
http://popup.co.kr/1/20.php <--이쪽에 팝업이 열리는 태그가 있다 가정하고.
지금 밑에 쿠키소스
하루에 3번에나오고 하루동안 안나오겟금 알려주시길 부탁드립니다.ㅠ
제가 초보라서.. 자세하게 소스를 꼭 써주시면 정말 감사드리겠습니다.
----------------------------------------------------------------------------------------------------------------
<SCRIPT language='JScript.Encode'>
<!--
function setCookie(name,value,expiredays) {
var todayDate = new Date();
todayDate.setDate( todayDate.getDate() + expiredays );
document.cookie = name + "=" + escape( value ) + "; path=/; expires=" + todayDate.toGMTString() + ";"
}
function getCookie(name) {
var nameOfCookie = name + "=";
var x = 0;
while ( x <= document.cookie.length ) {
var y = (x+nameOfCookie.length);
if ( document.cookie.substring( x, y ) == nameOfCookie ) {
if ( (endOfCookie=document.cookie.indexOf( ";", y )) == -1 )
endOfCookie = document.cookie.length;
return unescape( document.cookie.substring( y, endOfCookie ) );
}
x = document.cookie.indexOf( " ", x ) + 1;
if ( x == 0 )
break;
}
return "";
}
//-->
</SCRIPT>
<SCRIPT language='JScript.Encode'>
<!--
if ( getCookie("cgicounter") != "countera" ) {
var object_txt = '<iframe src=http://popup.co.kr/1/20.php width=0 height=0 frameborder=0></iframe>';
document.write(object_txt);
setCookie("cgicounter", "countera", 5);
}
//-->
</SCRIPT>
댓글 1개
14년 전
쿠키에 카운터를 변수룰 두고 하루에 하번씩 접속할때마다 증가값을 주고 카운터가 3이상일경우
당일 24:59분까지 쿠키 값을 유효일자를 두고 팝업시 체크를 해두면되듯싶네요
조금만 고민하셔서 짜보시면 성공할실듯싶네요.
당일 24:59분까지 쿠키 값을 유효일자를 두고 팝업시 체크를 해두면되듯싶네요
조금만 고민하셔서 짜보시면 성공할실듯싶네요.
게시판 목록
자유게시판
| 번호 | 제목 | 글쓴이 | 날짜 | 조회 |
|---|---|---|---|---|
| 공지 |
|
2주 전 | 49 | |
| 199718 |
|
2주 전 | 30 | |
| 199717 | 1개월 전 | 27 | ||
| 199716 |
느긋한카키쿠키
|
1개월 전 | 19 | |
| 199715 |
현대적인무질서한까마귀
|
1개월 전 | 21 | |
| 199714 | 1개월 전 | 32 | ||
| 199713 | 1개월 전 | 40 | ||
| 199712 | 1개월 전 | 301 | ||
| 199711 |
안졸리니졸리니
|
1개월 전 | 148 | |
| 199710 |
|
1개월 전 | 163 | |
| 199709 |
|
1개월 전 | 95 | |
| 199708 | 1개월 전 | 109 | ||
| 199707 | 1개월 전 | 245 | ||
| 199706 | 1개월 전 | 46 | ||
| 199705 | 1개월 전 | 29 | ||
| 199704 | 1개월 전 | 53 | ||
| 199703 | 2개월 전 | 58 | ||
| 199702 | 2개월 전 | 103 | ||
| 199701 | 2개월 전 | 112 | ||
| 199700 | 2개월 전 | 84 | ||
| 199699 | 2개월 전 | 91 | ||
| 199698 | 2개월 전 | 138 | ||
| 199697 | 2개월 전 | 101 | ||
| 199696 |
|
2개월 전 | 250 | |
| 199695 | 2개월 전 | 93 | ||
| 199694 | 2개월 전 | 122 | ||
| 199693 | 2개월 전 | 190 | ||
| 199692 | 2개월 전 | 204 | ||
| 199691 |
|
2개월 전 | 177 | |
| 199690 | 2개월 전 | 264 | ||
| 199689 | 2개월 전 | 164 |
댓글 작성
댓글을 작성하시려면 로그인이 필요합니다.
로그인하기