<script src="//ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"></script>
<script>
function sample(){
var cc=document.cookie;
cc = cc + "600";
if (cc == "600") document.cookie =f();
$("#memo").html(document.cookie);
}
function f(){
str = "";
for(s=1;s<11;s++){
str=str+randabc();
}
return str;
}
function randabc(){
n1=5*Math.random();
n2=Math.floor(n1)+1;
cc = "";
if (n2 == 1) cc = "a";
if (n2 == 2) cc = "b";
if (n2 == 3) cc = "c";
if (n2 == 4) cc = "d";
if (n2 == 5) cc = "e";
return cc;
}
</script>
最終更新:2015年10月08日 15:35