<!--  팝업 띄우기 소스  -->

window.onload = openMsgBox; 
function popUpClose(num){
if (num != 'today'){
document.getElementById("pop_notice").style.display = 'none';
}else{
setCookie("mainPopUp", "no" , 1);
}
}
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 ''; 
}
function openMsgBox(){
var eventCookie=getCookie('mainPopUp');
if (eventCookie != "no"){
document.getElementById("pop_notice").style.display = '';
}
}
신고

'07.Web' 카테고리의 다른 글

Apache ? Tomcat?  (0) 2011.06.03
java -jar hudson.jar  (0) 2011.05.28
REST CXF  (0) 2011.05.13
팝업창 Cookie를 이용한 일정 기간 내에 열지 않기  (0) 2009.12.07
WAS(Web Application Server) 와 Web Server  (0) 2009.11.30
JSTL param 객체 활용하기  (0) 2009.10.19
Posted by Stewie


티스토리 툴바