Control character in cookie value or attribute. 异常处理

原因:放入cookie的字符串有中文

解决方法:给中文字符串页面上加密解密,如下:

var acc = encodeURI(encodeURI("赣A95833"));
 acc = decodeURI(decodeURI(acc));
 console.log(acc);

猜你喜欢

转载自blog.csdn.net/dandelionoooo/article/details/86290420
今日推荐