清空Cookie

  function delCookie() { var cookies = document.cookie.match(/[^ =;]+(?=\=)/g); if (cookies != null) for (var i = 0; i < cookies.length; i++) { try { document.cookie = cookies[i] + "=0;expires=" + new Date().toGMTString() + ";path=/"; } catch (e) { alert("error"); } } };

 

posted @ 2015-05-07 21:15  xyzhuzhou  阅读(233)  评论(0编辑  收藏  举报