jQuery API | 返回首页目录 | jQuery API 中英文对照版 |
$.cookie(name, value, options) |
$.cookie(name, value, options)Create a cookie with the given name and value and other optional parameters. 返回值undefined 参数
Hash 选项
示例说明:Set the value of a cookie. jQuery 代码:$.cookie('the_cookie', 'the_value');说明:Create a cookie with all available options. jQuery 代码:$.cookie('the_cookie', 'the_value', {expires: 7, path: '/', domain: 'jquery.com', secure: true});说明:Create a session cookie. jQuery 代码:$.cookie('the_cookie', 'the_value');说明:Delete a cookie by setting a date in the past. jQuery 代码:$.cookie('the_cookie', '', {expires: -1}); |