y

텍스트 박스의 내용을 쿠키로 저장하는 스크립트 입니다.

<HTML>
<HEAD>
<script>
function ReadCookie (Name)
{
    var search = Name + "="
    if (document.cookie.length > 0)
    {
        offset = document.cookie.indexOf(search)
        if (offset != -1)
        {
            offset += search.length
            end = document.cookie.indexOf(";", offset)
            if (end == -1)
                end = document.cookie.length
            return (document.cookie.substring(offset, end))
        }
        else
            return ("");
    }
    else
        return ("");
}
function WriteCookie (cookieName, cookieValue, expiry)
{
    var expDate = new Date();
    expDate.setTime (expDate.getTime() + expiry);
    document.cookie = cookieName + "=" + escape (cookieValue) + "; expires=" + expDate.toGMTString() + "; path=/";
}
function getCookies()
{
    document.noteForm.note.value = unescape(ReadCookie("note"));
}
</script>

</head>
<body>
<form NAME="noteForm">
<textarea ROWS="5" COLS="40" NAME="note" WRAP="VIRTUAL"></textarea><br>
<input TYPE="button" VALUE="Save Text" onClick="WriteCookie('note', document.noteForm.note.value, 2678400000)">
<INPUT TYPE="button" VALUE="새로고침" onClick='parent.location="javascript:location.reload()"'>
</form>
<script>
window.onload=function() { getCookies(); }
</script>
[이 게시물은 관리자님에 의해 2011-10-31 17:16:08 PHP & HTML에서 이동 됨]
|
댓글을 작성하시려면 로그인이 필요합니다.

프로그램

+
제목 글쓴이 날짜 조회
18년 전 조회 3,420
18년 전 조회 2,724
18년 전 조회 2,957
18년 전 조회 2,283
18년 전 조회 2,096
18년 전 조회 2,045
18년 전 조회 3,079
18년 전 조회 2,364
18년 전 조회 2,385
18년 전 조회 2,059
18년 전 조회 2,435
18년 전 조회 3,168
18년 전 조회 4,101
18년 전 조회 3,381
18년 전 조회 2,016
18년 전 조회 1,958
18년 전 조회 2,872
18년 전 조회 1,668
18년 전 조회 2,018
18년 전 조회 2,307
18년 전 조회 2,176
18년 전 조회 2,273
18년 전 조회 4,042
18년 전 조회 1,793
18년 전 조회 4,393
18년 전 조회 2,929
18년 전 조회 2,239
18년 전 조회 3,281
18년 전 조회 2,903
18년 전 조회 2,839
18년 전 조회 5,637
18년 전 조회 2,303
18년 전 조회 3,423
18년 전 조회 3,333
18년 전 조회 3,716
18년 전 조회 3,269
18년 전 조회 2,450
18년 전 조회 2,097
18년 전 조회 2,551
18년 전 조회 6,120
18년 전 조회 2,745
18년 전 조회 4,545
18년 전 조회 2,042
18년 전 조회 1만
18년 전 조회 2,492
18년 전 조회 1,555
18년 전 조회 2,988
18년 전 조회 2,932
18년 전 조회 2,829
18년 전 조회 2,144
18년 전 조회 2,326
18년 전 조회 2,879
18년 전 조회 2,965
18년 전 조회 4,135
18년 전 조회 6,118
18년 전 조회 2,060
18년 전 조회 2,196
18년 전 조회 1,903
18년 전 조회 1,660
18년 전 조회 2,637
18년 전 조회 1,690
18년 전 조회 1,563
18년 전 조회 4,737
18년 전 조회 1,792
18년 전 조회 1,844
18년 전 조회 1,852
18년 전 조회 1,978
18년 전 조회 3,631
18년 전 조회 1,658
18년 전 조회 1,530
18년 전 조회 1,360
18년 전 조회 1,865
18년 전 조회 1,912
18년 전 조회 3,655
18년 전 조회 1,981
18년 전 조회 3,120
18년 전 조회 4,742
18년 전 조회 2,876
18년 전 조회 8,055
18년 전 조회 4,064
18년 전 조회 2,750
18년 전 조회 1,527
18년 전 조회 2,631
18년 전 조회 5,046
18년 전 조회 5,224
18년 전 조회 2,099
18년 전 조회 4,362
18년 전 조회 4,098
18년 전 조회 4,152
18년 전 조회 2,277
18년 전 조회 4,198
18년 전 조회 2,178
18년 전 조회 3,289
18년 전 조회 4,925
18년 전 조회 1,960
18년 전 조회 3,417
18년 전 조회 1,648
18년 전 조회 2,748
18년 전 조회 1,678
18년 전 조회 2,716
🐛 버그신고