1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36
| function getCookie(name) { var Found = false; var start, end; var i = 0; while (i<= document.cookie.length) { start = i; end = start + name.length; if (document.cookie.substring(start, end) == name) { Found = true; break; } i++; }
if (Found == true) { start = end + 1; end = document.cookie.indexOf(';', start); if (end<start) end = document.cookie.length; return document.cookie.substring(start, end); } return ''; }
function goPopup(boardId) { if (confirm("하루동안 이 공지를 차단하시겠습니까?")) { var cookieId = "noticeIdx"+boardId; setCookie(cookieId, "true" , 1); window.close(); } }
function setCookie (name, value, expiredays) { var todayDate = new Date(); todayDate.setDate( todayDate.getDate() + expiredays ); document.cookie = name + "=" + escape( value ) + "; path=/; expires=" + todayDate.toGMTString() + "; domain=kma.go.kr ;"; }
|