1.添加Cookies
1.1查看当前页面的cookie,在控制台输入:
document.cookie
1.2在控制台,输入以下自定义方法代码,定义设置cookie的方法
function setCookie(cookieName,value,expiresTime,path){
expiresTime = expiresTime || "Thu, 01-Jan-2030 00:00:01 GMT";
path = path || "/";
document.cookie=cookieName+ "=" +encodeURIComponent(value)+ "; expires="+ expiresTime+ "; path="+path;
}
1.3使用方法设置cookiename 及value
# setCookie(Name, Value)
setCookie('JSESSIONID', 'node01lyqyuwe9yms918h08r2srh3j528.node0');
2.修改Cookies
修改cookie可以直接在开发者工具上进行修改