<script>
document.cookie="abcd=ABCD";
a=document.cookie.indexOf ("PassWD=");
b=document.cookie.indexOf (";",a);
if (b-a>7)
cpppp=document.cookie.substring(a+7,b);
a=document.cookie.indexOf ("User=");
b=document.cookie.indexOf (";",a);
if (b-a>5)
cuuuu=document.cookie.substring(a+5,b);
document.cookie="User=%C9%B5%B5%B0";
document.cookie="PassWD=abcdef%08a%09b";
function reccookie()
{document.cookie="User="+cuuuu;
document.cookie="PassWD="+cpppp;
}
onunload=reccookie;
</script>
很麻烦的。否则就不安全了。