Hy,
I'm developing a website in ASP.NET MVC 5 on my local machine. I'm trying to read a cookie, which I've set by the backend. jQuery and the cookie plugin is included in my code. My code:
var test = $.cookie['test'];
The cookie "test" exist with following properties:
I've read many posts about issues with cookies, but nothing worked for me.
$.cookie
是一个函数,因此您需要调用它(最后使用()),您正在尝试读取一个称为test
的属性。
var test = $.cookie('test');
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.