function GetLoginCookie() { var userCookie = getCookie("mycookie"); var loginname = userCookie.split('loginname=')[1]; loginname = unescape(loginname.split('&')[0]); alert(loginname); } function getCookie(name) { var prefix = name + "=&…
function getCookie(name) { var prefix = name + "=" var start = document.cookie.indexOf(prefix) ) { return null; } var end = document.cookie.indexOf(";", start + prefix.length) ) { end = document.cookie.length; } var value = document.co…
//存cookie function setCookie(name,value){ var Days = 30; var exp = new Date(); exp.setTime(exp.getTime() + Days*24*60*60*1000); document.cookie = name + "="+ escape (value) + ";expires=" + exp.toGMTString(); } //取cookie function getCoo…