【www.gdgbn.com--js教程】

 代码如下

function getcookie(a){
 var b;
 b=a+"=";
 offset=document.cookie.indexof(b);
 if(offset!=-1){
  offset+=b.length;
  end=document.cookie.indexof(";",offset);
  if(end==-1){
   end=document.cookie.length
  }
  return document.cookie.substring(offset,end)
 }
 else{
  return""
 }
}
function unipro_clearcookie(a){
 document.cookie=a+"=; "+"domain=sina.com.cn; path=/; "
}


unipro_clearcookie("sinapro");

 

 

本文来源:http://www.gdgbn.com/wangyezhizuo/27357/