NotO6.03
ToFILE
function gCi(name){
cNm=name+'=';
Cki=document.cookie;
sPs=Cki.indexOf(cNm);
ePs=Cki.indexOf(';',sPs);
if(ePs==-1)ePs=Cki.length;
if(Cki.length==0)return null;
if(sPs!=-1){
sPs=sPs+cNm.length;
return unescape(Cki.substring(sPs,ePs))
}
return null
}
function sCi(name,value,expires){
document.cookie=name+'='+escape(value)+'; expires='+expires.toGMTString()
}
exp=new Date();
bse=new Date(0);
skw=bse.getTime();
if(skw>0)date.setTime(exp.getTime()-skw);
exp.setTime(exp.getTime()+(60*24*60*60*1000));
Vst=gCi('@vst');
if(Vst==null)Vst=0;
Vst++;
Nme=gCi('@name');
if(Nme==null){
Nme=prompt('名前を教えて下さい','');
if(Nme==null||Nme=='')Nme='ななしのごんべえ';
sCi('@name',Nme,exp)
}
sCi('@vst',Vst,exp)
ToHEAD
<SCRIPT SRC="sta.js" LANGUAGE="JavaScript" TYPE="text/javascript"></SCRIPT>
ToBODY
<SCRIPT LANGUAGE="JavaScript" TYPE="text/javascript">
<!--
document.write('こんにちは'+Nme+'さん<BR>');
document.write('今回で'+Vst+'回目の訪問ですね。');
//-->
</SCRIPT>
RESERVED
Vst,Nme,sPs,ePs,exp,skw,bse,cNm,Cki
|