[java] 스크립트 – 쿠키로 새창 제어하기
====== 헤드문 ====================
<script language=”javascript”>
<!–//
function closeme() {
top.close();
}
function setCookie(name, value, expiredays)
{
var todayDate = new Date();
todayDate.setDate(todayDate.getDate() + expiredays);
document.cookie=”popwin0505=done; path=/; expires=” + todayDate.toGMTString() + “;”
}
function closeWin()
{
if( document.signform.popwin0505.checked)
{
setCookie(“popwin0505”, “done”, 1);
}
self.close();
}
//–>
</script>
============ 바디문 ==================
<form name=signform action=””>
<input type=checkbox name=”popwin0505″>
<a href=”javascript:closeWin();”>다시 창 띄우지 않기</a>
<a href=”javascript:closeWin();”>닫기</a>
</form>
1 Response
… [Trackback]
[…] Information to that Topic: nblog.syszone.co.kr/archives/817 […]