popup 페이지에서 오늘 창 안열림 내용
<script language="JavaScript">
<!--
function setCookie( name, value, expiredays ){
var todayDate = new Date();
todayDate.setTime(todayDate.getTime() + 1000 * 3600 * 24 * expiredays);//1일
document.cookie = name + "=" + escape( value ) + "; path=/; expires=" + todayDate.toGMTString() + ";"
}
function getCurrentDate(){
var Stamp = new Date();
return Stamp.getYear()*10000+(Stamp.getMonth()+1)*100+Stamp.getDate();
}
function doNotOpen(event){
if ( event.checked ) {
setCookie( "loan_event", getCurrentDate() , 1);
}
self.close();
}
//-->
</script>
<input type="eventOpen" name="event" value="" onclick="doNotOpen(this)">
오늘은 그만~~~
메이페이지에서 쿠키값을 가지고 결정
<script language="JavaScript">
<!--
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 '';
}
function getCurrentDate(){
var Stamp = new Date();
return Stamp.getYear()*10000+(Stamp.getMonth()+1)*100+Stamp.getDate();
}
var currentDate = getCurrentDate();
var openChecker = getCookie("loan_event");
if(currentDate != openChecker){
Loanevent=window.open("popup/2005event.html","loan2005Event","width=500,height=700")
Loanevent.focus()
}
//-->
</script>
[출처] 오늘만 팝업창 열기 정리|작성자 bd0224
popup 페이지에서 오늘 창 안열림 내용
<script language="JavaScript">
<!--
function setCookie( name, value, expiredays ){
var todayDate = new Date();
todayDate.setTime(todayDate.getTime() + 1000 * 3600 * 24 * expiredays);//1일
document.cookie = name + "=" + escape( value ) + "; path=/; expires=" + todayDate.toGMTString() + ";"
}
function getCurrentDate(){
var Stamp = new Date();
return Stamp.getYear()*10000+(Stamp.getMonth()+1)*100+Stamp.getDate();
}
function doNotOpen(event){
if ( event.checked ) {
setCookie( "loan_event", getCurrentDate() , 1);
}
self.close();
}
//-->
</script>
<input type="eventOpen" name="event" value="" onclick="doNotOpen(this)">
오늘은 그만~~~
메이페이지에서 쿠키값을 가지고 결정
<script language="JavaScript">
<!--
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 '';
}
function getCurrentDate(){
var Stamp = new Date();
return Stamp.getYear()*10000+(Stamp.getMonth()+1)*100+Stamp.getDate();
}
var currentDate = getCurrentDate();
var openChecker = getCookie("loan_event");
if(currentDate != openChecker){
Loanevent=window.open("popup/2005event.html","loan2005Event","width=500,height=700")
Loanevent.focus()
}
//-->
</script>
[출처] 오늘만 팝업창 열기 정리|작성자 bd0224
'스크립트 > 윈도우창관련' 카테고리의 다른 글
IFRAME 자동 리사이즈 auto resize 최강 스크립트 - 알릭님껏 (5) | 2008.11.02 |
---|---|
마우스로 움직이는 레이어 간단한 팁, 드레그 Layer (0) | 2008.11.01 |
window창이 아닌 layer로 팝업효과 내기(하루에 한번 쿠기 포함) (0) | 2008.10.17 |
레이어로 Loading 페이지 만들기 (0) | 2008.10.17 |
이미지 저장아이콘 (0) | 2008.09.21 |