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,421
18년 전 조회 2,725
18년 전 조회 2,958
18년 전 조회 2,286
18년 전 조회 2,098
18년 전 조회 2,049
18년 전 조회 3,080
18년 전 조회 2,367
18년 전 조회 2,386
18년 전 조회 2,062
18년 전 조회 2,437
18년 전 조회 3,169
18년 전 조회 4,102
18년 전 조회 3,383
18년 전 조회 2,018
18년 전 조회 1,959
18년 전 조회 2,873
18년 전 조회 1,670
18년 전 조회 2,022
18년 전 조회 2,310
18년 전 조회 2,176
18년 전 조회 2,274
18년 전 조회 4,043
18년 전 조회 1,794
18년 전 조회 4,396
18년 전 조회 2,930
18년 전 조회 2,239
18년 전 조회 3,281
18년 전 조회 2,905
18년 전 조회 2,840
18년 전 조회 5,638
18년 전 조회 2,303
18년 전 조회 3,425
18년 전 조회 3,334
18년 전 조회 3,718
18년 전 조회 3,273
18년 전 조회 2,452
18년 전 조회 2,099
18년 전 조회 2,554
18년 전 조회 6,120
18년 전 조회 2,746
18년 전 조회 4,547
18년 전 조회 2,043
18년 전 조회 1만
18년 전 조회 2,492
18년 전 조회 1,555
18년 전 조회 2,990
18년 전 조회 2,934
18년 전 조회 2,831
18년 전 조회 2,146
18년 전 조회 2,330
18년 전 조회 2,879
18년 전 조회 2,970
18년 전 조회 4,137
18년 전 조회 6,121
18년 전 조회 2,063
18년 전 조회 2,198
18년 전 조회 1,905
18년 전 조회 1,662
18년 전 조회 2,640
18년 전 조회 1,690
18년 전 조회 1,565
18년 전 조회 4,739
18년 전 조회 1,795
18년 전 조회 1,849
18년 전 조회 1,857
18년 전 조회 1,980
18년 전 조회 3,634
18년 전 조회 1,658
18년 전 조회 1,532
18년 전 조회 1,364
18년 전 조회 1,869
18년 전 조회 1,913
18년 전 조회 3,656
18년 전 조회 1,981
18년 전 조회 3,123
18년 전 조회 4,745
18년 전 조회 2,877
18년 전 조회 8,057
18년 전 조회 4,064
18년 전 조회 2,751
18년 전 조회 1,528
18년 전 조회 2,633
18년 전 조회 5,047
18년 전 조회 5,227
18년 전 조회 2,103
18년 전 조회 4,363
18년 전 조회 4,101
18년 전 조회 4,156
18년 전 조회 2,279
18년 전 조회 4,201
18년 전 조회 2,182
18년 전 조회 3,291
18년 전 조회 4,926
18년 전 조회 1,961
18년 전 조회 3,418
18년 전 조회 1,649
18년 전 조회 2,751
18년 전 조회 1,680
18년 전 조회 2,720
🐛 버그신고