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,403
18년 전 조회 2,711
18년 전 조회 2,943
18년 전 조회 2,271
18년 전 조회 2,079
18년 전 조회 2,031
18년 전 조회 3,065
18년 전 조회 2,350
18년 전 조회 2,371
18년 전 조회 2,045
18년 전 조회 2,421
18년 전 조회 3,154
18년 전 조회 4,086
18년 전 조회 3,367
18년 전 조회 2,002
18년 전 조회 1,945
18년 전 조회 2,860
18년 전 조회 1,651
18년 전 조회 2,004
18년 전 조회 2,293
18년 전 조회 2,158
18년 전 조회 2,260
18년 전 조회 4,030
18년 전 조회 1,779
18년 전 조회 4,382
18년 전 조회 2,915
18년 전 조회 2,220
18년 전 조회 3,266
18년 전 조회 2,893
18년 전 조회 2,828
18년 전 조회 5,623
18년 전 조회 2,290
18년 전 조회 3,408
18년 전 조회 3,318
18년 전 조회 3,702
18년 전 조회 3,258
18년 전 조회 2,435
18년 전 조회 2,087
18년 전 조회 2,536
18년 전 조회 6,104
18년 전 조회 2,728
18년 전 조회 4,532
18년 전 조회 2,031
18년 전 조회 1만
18년 전 조회 2,477
18년 전 조회 1,540
18년 전 조회 2,977
18년 전 조회 2,920
18년 전 조회 2,818
18년 전 조회 2,131
18년 전 조회 2,311
18년 전 조회 2,862
18년 전 조회 2,955
18년 전 조회 4,121
18년 전 조회 6,109
18년 전 조회 2,045
18년 전 조회 2,178
18년 전 조회 1,888
18년 전 조회 1,648
18년 전 조회 2,623
18년 전 조회 1,681
18년 전 조회 1,552
18년 전 조회 4,730
18년 전 조회 1,780
18년 전 조회 1,831
18년 전 조회 1,839
18년 전 조회 1,965
18년 전 조회 3,620
18년 전 조회 1,646
18년 전 조회 1,519
18년 전 조회 1,348
18년 전 조회 1,852
18년 전 조회 1,899
18년 전 조회 3,645
18년 전 조회 1,972
18년 전 조회 3,105
18년 전 조회 4,730
18년 전 조회 2,860
18년 전 조회 8,043
18년 전 조회 4,051
18년 전 조회 2,735
18년 전 조회 1,515
18년 전 조회 2,615
18년 전 조회 5,032
18년 전 조회 5,212
18년 전 조회 2,087
18년 전 조회 4,346
18년 전 조회 4,090
18년 전 조회 4,143
18년 전 조회 2,266
18년 전 조회 4,187
18년 전 조회 2,168
18년 전 조회 3,276
18년 전 조회 4,911
18년 전 조회 1,947
18년 전 조회 3,404
18년 전 조회 1,637
18년 전 조회 2,737
18년 전 조회 1,661
18년 전 조회 2,706
🐛 버그신고