赞
踩
<script language="javascript">
function GetCookie (name) { //取得名称为name的cookie值
var arg = name + "=";
var alen = arg.length;
var clen = document.cookie.length;
var i = 0;
while (i < clen) {
var j = i + alen;
if (document.cookie.substring(i, j) == arg)
return getCookieVal (j);
i = document.cookie.indexOf(" ", i) + 1;
if (i == 0) break;
}
return null;
}
function getCookieVal (offset) { //取得项名称为offset的cookie值
var endstr = document.cookie.indexOf (";", offset);
if (endstr == -1)
endstr = document.cookie.length;
return unescape(document.cookie.substring(offset, endstr));
}
function DeleteCookie (name) { //删除名称为name的Cookie
var exp = new Date();
exp.setTime (exp.getTime() - 1);
var cval = GetCookie (name);
document.cookie = name + "=" + cval + "; expires=" + exp.toGMTString() + ";path=/;domain=.ask.jp";
// 有域名的时候加上path,domain,没有域名的时候不用加path,domain
}
function Clearcookie() {
var temp=document.cookie.split(";");
var i;
var ts;
for (i=0;i<temp.length;i++)
{
ts=temp[i].split("=")[0];
DeleteCookie(ts);
}
}
function goToSignUpNotCookie(){
Clearcookie();
top.window.location="<bean:message bundle='const' key='http.domain.name'/>signUpInit.do?goto=banaKurara";
}
</script>
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。