几种清除 cookie有效方法(js,asp,php)
JS清除cookie
function setcookie(name,days)
{
var url = document.domain;
var exp = new date();
exp.settime(exp.gettime() + days*24*60*60*1000);
document.cookie = name + "="+ escape(url) +";expires="+ exp.togmtstring();
}
setcookie('domain',-1);
</script>
asp清除cookie
response.cookies("mycookie").expires= (now()+1/24)
response.cookies("mycookie").expires = dateadd("h", 1, now())
response.cookies("cookiename").expires=dateadd("m",60,now())
php cookie
setcookie("memusername") 或 setcookie("memusername","",time()-60*60*24*365);
上一篇:微信公众平台教程之PHP开发实例
下一篇:Web 应用开源项目大收罗
讨论数量:0