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,414
18년 전 조회 2,719
18년 전 조회 2,952
18년 전 조회 2,281
18년 전 조회 2,091
18년 전 조회 2,039
18년 전 조회 3,073
18년 전 조회 2,361
18년 전 조회 2,381
18년 전 조회 2,053
18년 전 조회 2,430
18년 전 조회 3,162
18년 전 조회 4,095
18년 전 조회 3,377
18년 전 조회 2,012
18년 전 조회 1,954
18년 전 조회 2,867
18년 전 조회 1,663
18년 전 조회 2,011
18년 전 조회 2,303
18년 전 조회 2,167
18년 전 조회 2,267
18년 전 조회 4,038
18년 전 조회 1,789
18년 전 조회 4,389
18년 전 조회 2,923
18년 전 조회 2,231
18년 전 조회 3,274
18년 전 조회 2,899
18년 전 조회 2,835
18년 전 조회 5,630
18년 전 조회 2,296
18년 전 조회 3,418
18년 전 조회 3,325
18년 전 조회 3,712
18년 전 조회 3,267
18년 전 조회 2,446
18년 전 조회 2,095
18년 전 조회 2,546
18년 전 조회 6,113
18년 전 조회 2,737
18년 전 조회 4,541
18년 전 조회 2,037
18년 전 조회 1만
18년 전 조회 2,486
18년 전 조회 1,549
18년 전 조회 2,986
18년 전 조회 2,926
18년 전 조회 2,824
18년 전 조회 2,140
18년 전 조회 2,319
18년 전 조회 2,872
18년 전 조회 2,964
18년 전 조회 4,129
18년 전 조회 6,117
18년 전 조회 2,056
18년 전 조회 2,189
18년 전 조회 1,896
18년 전 조회 1,658
18년 전 조회 2,631
18년 전 조회 1,688
18년 전 조회 1,560
18년 전 조회 4,736
18년 전 조회 1,788
18년 전 조회 1,840
18년 전 조회 1,849
18년 전 조회 1,975
18년 전 조회 3,627
18년 전 조회 1,652
18년 전 조회 1,524
18년 전 조회 1,357
18년 전 조회 1,859
18년 전 조회 1,906
18년 전 조회 3,651
18년 전 조회 1,981
18년 전 조회 3,114
18년 전 조회 4,739
18년 전 조회 2,870
18년 전 조회 8,050
18년 전 조회 4,061
18년 전 조회 2,741
18년 전 조회 1,521
18년 전 조회 2,626
18년 전 조회 5,042
18년 전 조회 5,220
18년 전 조회 2,096
18년 전 조회 4,355
18년 전 조회 4,096
18년 전 조회 4,149
18년 전 조회 2,273
18년 전 조회 4,192
18년 전 조회 2,175
18년 전 조회 3,286
18년 전 조회 4,919
18년 전 조회 1,954
18년 전 조회 3,412
18년 전 조회 1,645
18년 전 조회 2,742
18년 전 조회 1,671
18년 전 조회 2,712
🐛 버그신고