所以如果全站不分path 的 话。应该显示的写上 path 。设置为根目录
function setCookie(name, value) { document.cookie = name + "=" + escape(value) + ";path=/"; }