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,411
18년 전 조회 2,718
18년 전 조회 2,948
18년 전 조회 2,279
18년 전 조회 2,086
18년 전 조회 2,036
18년 전 조회 3,069
18년 전 조회 2,356
18년 전 조회 2,376
18년 전 조회 2,049
18년 전 조회 2,426
18년 전 조회 3,159
18년 전 조회 4,091
18년 전 조회 3,374
18년 전 조회 2,009
18년 전 조회 1,951
18년 전 조회 2,865
18년 전 조회 1,658
18년 전 조회 2,009
18년 전 조회 2,301
18년 전 조회 2,163
18년 전 조회 2,264
18년 전 조회 4,035
18년 전 조회 1,787
18년 전 조회 4,387
18년 전 조회 2,922
18년 전 조회 2,228
18년 전 조회 3,270
18년 전 조회 2,897
18년 전 조회 2,834
18년 전 조회 5,629
18년 전 조회 2,293
18년 전 조회 3,414
18년 전 조회 3,322
18년 전 조회 3,709
18년 전 조회 3,265
18년 전 조회 2,442
18년 전 조회 2,093
18년 전 조회 2,542
18년 전 조회 6,110
18년 전 조회 2,736
18년 전 조회 4,538
18년 전 조회 2,035
18년 전 조회 1만
18년 전 조회 2,483
18년 전 조회 1,548
18년 전 조회 2,983
18년 전 조회 2,925
18년 전 조회 2,821
18년 전 조회 2,139
18년 전 조회 2,316
18년 전 조회 2,869
18년 전 조회 2,961
18년 전 조회 4,124
18년 전 조회 6,115
18년 전 조회 2,053
18년 전 조회 2,185
18년 전 조회 1,893
18년 전 조회 1,653
18년 전 조회 2,629
18년 전 조회 1,688
18년 전 조회 1,557
18년 전 조회 4,732
18년 전 조회 1,786
18년 전 조회 1,839
18년 전 조회 1,846
18년 전 조회 1,970
18년 전 조회 3,624
18년 전 조회 1,650
18년 전 조회 1,523
18년 전 조회 1,353
18년 전 조회 1,857
18년 전 조회 1,904
18년 전 조회 3,648
18년 전 조회 1,978
18년 전 조회 3,110
18년 전 조회 4,736
18년 전 조회 2,866
18년 전 조회 8,048
18년 전 조회 4,058
18년 전 조회 2,739
18년 전 조회 1,519
18년 전 조회 2,621
18년 전 조회 5,036
18년 전 조회 5,218
18년 전 조회 2,094
18년 전 조회 4,352
18년 전 조회 4,096
18년 전 조회 4,148
18년 전 조회 2,271
18년 전 조회 4,191
18년 전 조회 2,173
18년 전 조회 3,282
18년 전 조회 4,917
18년 전 조회 1,952
18년 전 조회 3,410
18년 전 조회 1,642
18년 전 조회 2,739
18년 전 조회 1,668
18년 전 조회 2,712
🐛 버그신고