// 从cookie中获取用户名 var username = null;
var cookies = document.cookie.split(';');
for (var i = 0; i < cookies.length; i++) {
var cookie = cookies[i].trim();
if (cookie.indexOf('username=') == 0) {
username = cookie.substring('username='.length, cookie.length);
break;
}
}
JSP从 cookie拿到用户名
最新推荐文章于 2024-08-24 23:39:33 发布