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,285
18년 전 조회 2,098
18년 전 조회 2,049
18년 전 조회 3,080
18년 전 조회 2,367
18년 전 조회 2,386
18년 전 조회 2,062
18년 전 조회 2,435
18년 전 조회 3,168
18년 전 조회 4,102
18년 전 조회 3,382
18년 전 조회 2,017
18년 전 조회 1,959
18년 전 조회 2,873
18년 전 조회 1,670
18년 전 조회 2,021
18년 전 조회 2,309
18년 전 조회 2,176
18년 전 조회 2,274
18년 전 조회 4,043
18년 전 조회 1,794
18년 전 조회 4,395
18년 전 조회 2,930
18년 전 조회 2,239
18년 전 조회 3,281
18년 전 조회 2,905
18년 전 조회 2,840
18년 전 조회 5,637
18년 전 조회 2,303
18년 전 조회 3,424
18년 전 조회 3,333
18년 전 조회 3,718
18년 전 조회 3,272
18년 전 조회 2,451
18년 전 조회 2,099
18년 전 조회 2,553
18년 전 조회 6,120
18년 전 조회 2,745
18년 전 조회 4,546
18년 전 조회 2,042
18년 전 조회 1만
18년 전 조회 2,492
18년 전 조회 1,555
18년 전 조회 2,990
18년 전 조회 2,933
18년 전 조회 2,831
18년 전 조회 2,145
18년 전 조회 2,328
18년 전 조회 2,879
18년 전 조회 2,968
18년 전 조회 4,137
18년 전 조회 6,121
18년 전 조회 2,061
18년 전 조회 2,198
18년 전 조회 1,905
18년 전 조회 1,662
18년 전 조회 2,639
18년 전 조회 1,690
18년 전 조회 1,565
18년 전 조회 4,739
18년 전 조회 1,794
18년 전 조회 1,847
18년 전 조회 1,855
18년 전 조회 1,979
18년 전 조회 3,633
18년 전 조회 1,658
18년 전 조회 1,532
18년 전 조회 1,362
18년 전 조회 1,867
18년 전 조회 1,913
18년 전 조회 3,656
18년 전 조회 1,981
18년 전 조회 3,122
18년 전 조회 4,745
18년 전 조회 2,877
18년 전 조회 8,056
18년 전 조회 4,064
18년 전 조회 2,751
18년 전 조회 1,527
18년 전 조회 2,632
18년 전 조회 5,047
18년 전 조회 5,226
18년 전 조회 2,102
18년 전 조회 4,362
18년 전 조회 4,100
18년 전 조회 4,156
18년 전 조회 2,278
18년 전 조회 4,199
18년 전 조회 2,180
18년 전 조회 3,290
18년 전 조회 4,926
18년 전 조회 1,961
18년 전 조회 3,418
18년 전 조회 1,649
18년 전 조회 2,750
18년 전 조회 1,679
18년 전 조회 2,720
🐛 버그신고