原因:放入cookie的字符串有中文
解决方法:给中文字符串页面上加密解密,如下:
var acc = encodeURI(encodeURI("赣A95833"));
acc = decodeURI(decodeURI(acc));
console.log(acc);
原因:放入cookie的字符串有中文
解决方法:给中文字符串页面上加密解密,如下:
var acc = encodeURI(encodeURI("赣A95833"));
acc = decodeURI(decodeURI(acc));
console.log(acc);