Authored by 郭成尧

cookies-foreach-forie8

... ... @@ -22,7 +22,7 @@
name = '_UID',
cookies = (document.cookie && document.cookie.split(';')) || [];
cookies instanceof Array && cookies.forEach(function(c) {
cookies.forEach && cookies.forEach(function(c) {
if (c.indexOf(name) > -1) {
uid = decodeURIComponent(c.replace(name + '=', '').trim());
return;
... ...
... ... @@ -28,7 +28,7 @@ function cookie(name) {
if (cookies) {
cookies = cookies.split(';');
cookies instanceof Array && cookies.forEach(function(c) {
cookies.forEach && cookies.forEach(function(c) {
if (c.indexOf(name) > -1) {
cookieVal = decodeURIComponent($.trim(c.replace(name + '=', '')));
return;
... ...