$.cookie的用法
$.cookie('the_cookie','the_value',{expires:7,path:'/',domain:'jquery.com',secure:true});
the_cookie:待写入的Cookie名,'the_value'待写入的值
expires:有效期,单位为天,如果指定日期为负数,那么此Cookie将被删除,如果不设置或者设置为null,那么此Cookie将被当做Session Cookie处理,并且在浏览器关闭后删除。
path:cookie的路径属性
domain:cookie的域名属性
secure:如果设置为true,那么此Cookie的传输会要求一个安全协议,例如HTTPS.
转载于:https://blog.51cto.com/wlq1203/775623