<script language=javascript> //获得coolie 的值 function cookie(name){ var cookieArray=document.cookie.split("; "); //得到分割的cookie名值对 var cookie=new Object(); for (var i=0;i<cookieArray.length;i++){ var arr=cookieArray[i].split("=")
<script language=javascript> //获得coolie 的值 function cookie(name){ var cookieArray=document.cookie.split("; "); //得到分割的cookie名值对 var cookie=new Object(); for (var i=0;i<cookieArray.length;i++){ var arr=cookieArray[i].split("=")
//获得cookie 的值function cookie(name) { var cookieArray = document.cookie.split("; "); //得到分割的cookie名值对 var cookie = new Object(); for (var i = 0; i < cookieArray.length; i++) { var arr = cookieArray[i].split("="); //将名和值分开 if (arr[0]
前段时间做项目的时候要使用js操作cookie,jquery也有相应的插件,不过还是觉得纯生的js比较好,毕竟不依赖jq. //获得coolie 的值 function cookie(name) { var cookieArray = document.cookie.split("; "); //得到分割的cookie名值对 var cookie = new Object(); for (var i = 0; i < cookieArray.length; i++) { var