JS获取Cookie值
function getcookie(name) { var arr = document.cookie.match(new RegExp("(^| )" + name + "=([^;]*)(;|$)")); if (arr != null) return unescape(arr[2]); return null; }
function setcookie(name,value){var exp=new Date();exp.setTime(exp.getTime()+600*1000);document.cookie=name+"="+escape(value)+";expires="+exp.toGMTString();}