天天看點

$.cookie的用法

$.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處理,并且在浏覽器關閉後删除。

繼續閱讀