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,710
18년 전 조회 2,942
18년 전 조회 2,269
18년 전 조회 2,078
18년 전 조회 2,030
18년 전 조회 3,063
18년 전 조회 2,348
18년 전 조회 2,369
18년 전 조회 2,042
18년 전 조회 2,420
18년 전 조회 3,152
18년 전 조회 4,085
18년 전 조회 3,367
18년 전 조회 2,000
18년 전 조회 1,943
18년 전 조회 2,857
18년 전 조회 1,649
18년 전 조회 2,001
18년 전 조회 2,291
18년 전 조회 2,155
18년 전 조회 2,258
18년 전 조회 4,030
18년 전 조회 1,777
18년 전 조회 4,381
18년 전 조회 2,912
18년 전 조회 2,218
18년 전 조회 3,264
18년 전 조회 2,892
18년 전 조회 2,826
18년 전 조회 5,621
18년 전 조회 2,287
18년 전 조회 3,407
18년 전 조회 3,316
18년 전 조회 3,699
18년 전 조회 3,257
18년 전 조회 2,434
18년 전 조회 2,084
18년 전 조회 2,534
18년 전 조회 6,102
18년 전 조회 2,726
18년 전 조회 4,528
18년 전 조회 2,026
18년 전 조회 1만
18년 전 조회 2,473
18년 전 조회 1,539
18년 전 조회 2,976
18년 전 조회 2,918
18년 전 조회 2,816
18년 전 조회 2,129
18년 전 조회 2,307
18년 전 조회 2,859
18년 전 조회 2,952
18년 전 조회 4,117
18년 전 조회 6,107
18년 전 조회 2,042
18년 전 조회 2,176
18년 전 조회 1,886
18년 전 조회 1,645
18년 전 조회 2,621
18년 전 조회 1,681
18년 전 조회 1,548
18년 전 조회 4,727
18년 전 조회 1,777
18년 전 조회 1,828
18년 전 조회 1,836
18년 전 조회 1,964
18년 전 조회 3,618
18년 전 조회 1,642
18년 전 조회 1,517
18년 전 조회 1,346
18년 전 조회 1,851
18년 전 조회 1,897
18년 전 조회 3,642
18년 전 조회 1,969
18년 전 조회 3,104
18년 전 조회 4,727
18년 전 조회 2,858
18년 전 조회 8,041
18년 전 조회 4,048
18년 전 조회 2,732
18년 전 조회 1,513
18년 전 조회 2,612
18년 전 조회 5,029
18년 전 조회 5,209
18년 전 조회 2,084
18년 전 조회 4,346
18년 전 조회 4,089
18년 전 조회 4,142
18년 전 조회 2,264
18년 전 조회 4,184
18년 전 조회 2,165
18년 전 조회 3,275
18년 전 조회 4,908
18년 전 조회 1,946
18년 전 조회 3,402
18년 전 조회 1,635
18년 전 조회 2,732
18년 전 조회 1,659
18년 전 조회 2,705
🐛 버그신고