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,402
18년 전 조회 2,711
18년 전 조회 2,943
18년 전 조회 2,270
18년 전 조회 2,079
18년 전 조회 2,031
18년 전 조회 3,064
18년 전 조회 2,350
18년 전 조회 2,370
18년 전 조회 2,043
18년 전 조회 2,420
18년 전 조회 3,154
18년 전 조회 4,085
18년 전 조회 3,367
18년 전 조회 2,001
18년 전 조회 1,943
18년 전 조회 2,858
18년 전 조회 1,650
18년 전 조회 2,003
18년 전 조회 2,291
18년 전 조회 2,156
18년 전 조회 2,259
18년 전 조회 4,030
18년 전 조회 1,777
18년 전 조회 4,381
18년 전 조회 2,912
18년 전 조회 2,219
18년 전 조회 3,265
18년 전 조회 2,892
18년 전 조회 2,826
18년 전 조회 5,622
18년 전 조회 2,290
18년 전 조회 3,408
18년 전 조회 3,318
18년 전 조회 3,702
18년 전 조회 3,257
18년 전 조회 2,434
18년 전 조회 2,085
18년 전 조회 2,535
18년 전 조회 6,103
18년 전 조회 2,727
18년 전 조회 4,531
18년 전 조회 2,029
18년 전 조회 1만
18년 전 조회 2,474
18년 전 조회 1,539
18년 전 조회 2,976
18년 전 조회 2,919
18년 전 조회 2,817
18년 전 조회 2,130
18년 전 조회 2,310
18년 전 조회 2,861
18년 전 조회 2,954
18년 전 조회 4,118
18년 전 조회 6,109
18년 전 조회 2,044
18년 전 조회 2,176
18년 전 조회 1,886
18년 전 조회 1,647
18년 전 조회 2,622
18년 전 조회 1,681
18년 전 조회 1,551
18년 전 조회 4,728
18년 전 조회 1,780
18년 전 조회 1,831
18년 전 조회 1,839
18년 전 조회 1,965
18년 전 조회 3,620
18년 전 조회 1,644
18년 전 조회 1,517
18년 전 조회 1,348
18년 전 조회 1,852
18년 전 조회 1,898
18년 전 조회 3,643
18년 전 조회 1,969
18년 전 조회 3,105
18년 전 조회 4,728
18년 전 조회 2,859
18년 전 조회 8,042
18년 전 조회 4,050
18년 전 조회 2,733
18년 전 조회 1,514
18년 전 조회 2,614
18년 전 조회 5,029
18년 전 조회 5,210
18년 전 조회 2,086
18년 전 조회 4,346
18년 전 조회 4,090
18년 전 조회 4,142
18년 전 조회 2,265
18년 전 조회 4,185
18년 전 조회 2,166
18년 전 조회 3,276
18년 전 조회 4,909
18년 전 조회 1,947
18년 전 조회 3,402
18년 전 조회 1,636
18년 전 조회 2,735
18년 전 조회 1,660
18년 전 조회 2,705
🐛 버그신고