userData ºñÇìÀ̹ö¿¡ ÀÚÁ¤µÈ µ¥ÀÌÅÍÀÇ ¸¸·á ÀÏÀÚ¸¦ ¹ÝȯÇϰųª ¼³Á¤ÇÑ´Ù.
´Â ÇùÁ¤ ¼¼°è Ç¥ÁؽÃ(UTC)¸¦ »ç¿ëÇÏ¿© ¹®ÀÚ¿·Î º¯È¯µÈ ÀÏÀÚ, ½Ã°£ÀÎ UTCString Çü½ÄÀÌ´Ù.
ÀÌ ¼Ó¼ºÀº Àбâ/¾²±âÀ̸ç, µðÆúÆ®°ªÀº ¾ø´Ù.
°³Ã¼ | script | XML | ±Ô°Ý | IE |
---|
ÀÔ·ÂÄÀÇ ³»¿ëÀ» º¯°æ½ÃÄѺ¸¶ó. ¿¹Á¦´Â expires ¼Ó¼ºÀ» »ç¿ëÇÏ¿© 1000ÃÊ°£ ¸¸·á ±â°£À» ÁöÁ¤ÇÑ´Ù.
<STYLE>
.userData { behavior: url(#default#userData)}
</STYLE>
<SCRIPT>
function doSaveShow(){
var startTime=endTime=new Date();
str='½ÃÀÛ : '+ startTime.toUTCString()+'<BR>';
endTime.setSeconds(endTime.getSeconds()+1000);
str+='¸¸·á : '+ endTime.toUTCString()+'<BR>';
showA.innerHTML=str;
divObj.expires=endTime;
divObj.setAttribute("sData",textObj.value);
divObj.save("sTimeout"); // persistence "sTimeout" µ¥ÀÌÅÍÀÇ ÀúÀå
}
</SCRIPT>
<DIV class="userData" id=divObj >
<INPUT type=text id=textObj onchange="doSaveShow()">
</DIV>
<DIV id=showA style="border:1"> </DIV>