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,408
18년 전 조회 2,717
18년 전 조회 2,947
18년 전 조회 2,276
18년 전 조회 2,084
18년 전 조회 2,035
18년 전 조회 3,068
18년 전 조회 2,355
18년 전 조회 2,375
18년 전 조회 2,047
18년 전 조회 2,424
18년 전 조회 3,158
18년 전 조회 4,089
18년 전 조회 3,371
18년 전 조회 2,005
18년 전 조회 1,950
18년 전 조회 2,864
18년 전 조회 1,656
18년 전 조회 2,007
18년 전 조회 2,296
18년 전 조회 2,163
18년 전 조회 2,264
18년 전 조회 4,034
18년 전 조회 1,784
18년 전 조회 4,385
18년 전 조회 2,919
18년 전 조회 2,226
18년 전 조회 3,269
18년 전 조회 2,895
18년 전 조회 2,831
18년 전 조회 5,626
18년 전 조회 2,292
18년 전 조회 3,413
18년 전 조회 3,322
18년 전 조회 3,708
18년 전 조회 3,264
18년 전 조회 2,441
18년 전 조회 2,092
18년 전 조회 2,541
18년 전 조회 6,110
18년 전 조회 2,734
18년 전 조회 4,537
18년 전 조회 2,034
18년 전 조회 1만
18년 전 조회 2,481
18년 전 조회 1,544
18년 전 조회 2,982
18년 전 조회 2,924
18년 전 조회 2,821
18년 전 조회 2,136
18년 전 조회 2,314
18년 전 조회 2,867
18년 전 조회 2,961
18년 전 조회 4,124
18년 전 조회 6,115
18년 전 조회 2,051
18년 전 조회 2,183
18년 전 조회 1,892
18년 전 조회 1,652
18년 전 조회 2,628
18년 전 조회 1,686
18년 전 조회 1,557
18년 전 조회 4,732
18년 전 조회 1,785
18년 전 조회 1,836
18년 전 조회 1,843
18년 전 조회 1,970
18년 전 조회 3,624
18년 전 조회 1,650
18년 전 조회 1,523
18년 전 조회 1,352
18년 전 조회 1,856
18년 전 조회 1,904
18년 전 조회 3,648
18년 전 조회 1,975
18년 전 조회 3,109
18년 전 조회 4,736
18년 전 조회 2,865
18년 전 조회 8,048
18년 전 조회 4,057
18년 전 조회 2,739
18년 전 조회 1,519
18년 전 조회 2,620
18년 전 조회 5,036
18년 전 조회 5,217
18년 전 조회 2,093
18년 전 조회 4,352
18년 전 조회 4,096
18년 전 조회 4,147
18년 전 조회 2,270
18년 전 조회 4,190
18년 전 조회 2,172
18년 전 조회 3,281
18년 전 조회 4,915
18년 전 조회 1,952
18년 전 조회 3,408
18년 전 조회 1,641
18년 전 조회 2,739
18년 전 조회 1,666
18년 전 조회 2,711
🐛 버그신고