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,419
18년 전 조회 2,721
18년 전 조회 2,955
18년 전 조회 2,283
18년 전 조회 2,094
18년 전 조회 2,043
18년 전 조회 3,074
18년 전 조회 2,362
18년 전 조회 2,383
18년 전 조회 2,055
18년 전 조회 2,432
18년 전 조회 3,164
18년 전 조회 4,098
18년 전 조회 3,379
18년 전 조회 2,013
18년 전 조회 1,957
18년 전 조회 2,870
18년 전 조회 1,666
18년 전 조회 2,016
18년 전 조회 2,307
18년 전 조회 2,172
18년 전 조회 2,270
18년 전 조회 4,040
18년 전 조회 1,792
18년 전 조회 4,392
18년 전 조회 2,926
18년 전 조회 2,235
18년 전 조회 3,278
18년 전 조회 2,900
18년 전 조회 2,837
18년 전 조회 5,635
18년 전 조회 2,298
18년 전 조회 3,419
18년 전 조회 3,329
18년 전 조회 3,715
18년 전 조회 3,268
18년 전 조회 2,446
18년 전 조회 2,096
18년 전 조회 2,550
18년 전 조회 6,116
18년 전 조회 2,737
18년 전 조회 4,543
18년 전 조회 2,040
18년 전 조회 1만
18년 전 조회 2,488
18년 전 조회 1,554
18년 전 조회 2,986
18년 전 조회 2,930
18년 전 조회 2,825
18년 전 조회 2,142
18년 전 조회 2,322
18년 전 조회 2,874
18년 전 조회 2,964
18년 전 조회 4,132
18년 전 조회 6,117
18년 전 조회 2,057
18년 전 조회 2,193
18년 전 조회 1,899
18년 전 조회 1,659
18년 전 조회 2,634
18년 전 조회 1,689
18년 전 조회 1,562
18년 전 조회 4,737
18년 전 조회 1,790
18년 전 조회 1,842
18년 전 조회 1,849
18년 전 조회 1,977
18년 전 조회 3,629
18년 전 조회 1,655
18년 전 조회 1,527
18년 전 조회 1,359
18년 전 조회 1,862
18년 전 조회 1,911
18년 전 조회 3,652
18년 전 조회 1,981
18년 전 조회 3,115
18년 전 조회 4,742
18년 전 조회 2,874
18년 전 조회 8,053
18년 전 조회 4,063
18년 전 조회 2,747
18년 전 조회 1,525
18년 전 조회 2,628
18년 전 조회 5,045
18년 전 조회 5,223
18년 전 조회 2,097
18년 전 조회 4,360
18년 전 조회 4,097
18년 전 조회 4,151
18년 전 조회 2,277
18년 전 조회 4,194
18년 전 조회 2,177
18년 전 조회 3,288
18년 전 조회 4,922
18년 전 조회 1,957
18년 전 조회 3,414
18년 전 조회 1,647
18년 전 조회 2,744
18년 전 조회 1,674
18년 전 조회 2,716
🐛 버그신고