熱點推薦:
您现在的位置: 電腦知識網 >> 編程 >> .NET編程 >> 正文

幾種清除cookie有效方法(js,asp,php)

2013-11-13 10:38:23  來源: .NET編程 

  幾種清除 cookie有效方法(網頁特效asp教程php教程)
網頁特效設置cookie過期時間
<script language="網頁特效">

  function setcookie(namedays)
 {
  var url = documentdomain;
  var exp = new date();
  expsettime(expgettime() + days****);
  documentcookie = name + "="+ escape(url) +";expires="+ exptogmtstring();
 }
setcookie(domain);
</script>

  asp清除cookie

  responsecookies("mycookie")expires= (now()+/)
responsecookies("mycookie")expires = dateadd("h" now())
responsecookies("cookiename")expires=dateadd("m"now())
php cookie

  setcookie("memusername") 或 setcookie("memusername"""time()***);
 


From:http://tw.wingwit.com/Article/program/net/201311/14188.html
    推薦文章
    Copyright © 2005-2013 電腦知識網 Computer Knowledge   All rights reserved.