쿠키를 이용한 레이어 공지창 (오늘 하루 열지 않음 기능을 레이어로)

<html>
<head>
    <title>http://www.blueb.co.kr</title>

<script language="JavaScript">
<!--
function setCookie( name, value, expiredays ) {
    var todayDate = new Date();
        todayDate.setDate( todayDate.getDate() + expiredays );
        document.cookie = name + "=" + escape( value ) + "; path=/; expires=" + todayDate.toGMTString() + ";"
    }

function closeWin() {
    if ( document.notice_form.chkbox.checked ){
        setCookie( "maindiv", "done" , 1 );
    }
    document.all['divpop'].style.visibility = "hidden";
}
//--> 
</script>
</head>
<body bgcolor="#FFFFFF" text="#000000" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0"> 


<!-- POPUP -->
<div id="divpop" style="position:absolute;left:395px;top:190;z-index:200;visibility:hidden;">
<table width=300 height=400 cellpadding=2 cellspacing=0>
<tr>
    <td style="border:1px #666666 solid" height=360 align=center bgcolor=white>
    여기에 내용 삽입
    </td>
</tr>
<tr>
        <form name="notice_form">
    <td align=right bgcolor=white>
        <input type="checkbox" name="chkbox" value="checkbox">오늘 하루 이 창을 열지 않음
        <a href="javascript:closeWin();"><B>[닫기]</B></a>
    </td>
</tr>
        </form>
</table>
</div> 

<script language="Javascript">
cookiedata = document.cookie;   
if ( cookiedata.indexOf("maindiv=done") < 0 ){     
    document.all['divpop'].style.visibility = "visible";
    }
    else {
        document.all['divpop'].style.visibility = "hidden";
}
</script>

[이 게시물은 관리자님에 의해 2011-10-31 17:16:08 PHP & HTML에서 이동 됨]
|

댓글 1개

담아갑니다. 감솨해요!!!!
댓글을 작성하시려면 로그인이 필요합니다.

프로그램

태그 필터 (최대 3개) 전체 개발자 소스 기타 mysql 팁자료실 javascript php linux flash 정규표현식 jquery node.js mobile 웹서버 os 프로그램 강좌 썸네일 이미지관련 도로명주소 그누보드5 기획자 견적서 계약서 기획서 마케팅 제안서 seo 통계 서식 통계자료 퍼블리셔 html css 반응형 웹접근성 퍼블리싱 표준화 반응형웹 홈페이지기초 부트스트랩 angularjs 포럼 스크린리더 센스리더 개발자톡 개발자팁 퍼블리셔톡 퍼블리셔팁 기획자톡 기획자팁 프로그램강좌 퍼블리싱강좌
+
제목 글쓴이 날짜 조회
17년 전 조회 2,469
17년 전 조회 2,893
17년 전 조회 3,263
17년 전 조회 3,202
17년 전 조회 2,356
17년 전 조회 3,783
17년 전 조회 3,204
17년 전 조회 5,529
17년 전 조회 2,684
17년 전 조회 1,892
17년 전 조회 1,965
17년 전 조회 1,803
17년 전 조회 1,734
17년 전 조회 2,795
17년 전 조회 1,916
17년 전 조회 1,602
17년 전 조회 2,099
17년 전 조회 1,150
17년 전 조회 1,697
17년 전 조회 2,906
17년 전 조회 2,151
17년 전 조회 1,835
17년 전 조회 2,054
17년 전 조회 1,356
17년 전 조회 1,733
17년 전 조회 1,248
17년 전 조회 1,801
17년 전 조회 1,812
17년 전 조회 1,071
17년 전 조회 3,164
17년 전 조회 4,346
17년 전 조회 2,486
17년 전 조회 7,501
17년 전 조회 3,848
17년 전 조회 4,191
17년 전 조회 2,450
17년 전 조회 2,917
17년 전 조회 3,663
17년 전 조회 4,031
17년 전 조회 3,190
17년 전 조회 3,175
17년 전 조회 3,328
17년 전 조회 2,487
17년 전 조회 2,087
17년 전 조회 3,132
17년 전 조회 3,285
17년 전 조회 4,637
17년 전 조회 1,610
17년 전 조회 2,643
17년 전 조회 2,723
17년 전 조회 1,936
17년 전 조회 2,241
17년 전 조회 1,867
17년 전 조회 2,407
17년 전 조회 3,801
17년 전 조회 3,914
17년 전 조회 2,111
17년 전 조회 1,388
17년 전 조회 1,522
17년 전 조회 1,664
17년 전 조회 1,642
17년 전 조회 1,406
17년 전 조회 1,546
17년 전 조회 1,365
17년 전 조회 1,859
17년 전 조회 2,772
17년 전 조회 1,864
17년 전 조회 1,421
17년 전 조회 1,706
17년 전 조회 2,352
17년 전 조회 1,973
17년 전 조회 1,283
17년 전 조회 5,924
17년 전 조회 3,312
17년 전 조회 3,207
17년 전 조회 2,625
17년 전 조회 2,801
17년 전 조회 2,749
17년 전 조회 3,256
17년 전 조회 2,384
17년 전 조회 2,497
17년 전 조회 2,562
17년 전 조회 2,555
17년 전 조회 2,686
17년 전 조회 3,224
17년 전 조회 2,725
17년 전 조회 1,463
17년 전 조회 2,874
17년 전 조회 1,621
17년 전 조회 1,366
17년 전 조회 2,037
17년 전 조회 1,490
17년 전 조회 1,425
17년 전 조회 1,365
17년 전 조회 1,585
17년 전 조회 2,076
17년 전 조회 1,458
17년 전 조회 1,431
17년 전 조회 1,241
17년 전 조회 1,462