日期:2014-05-16 浏览次数:20421 次
function delCookie(name)
{
document.cookie = name + "=0;expires=" +
(new Date(((new Date()).getTime() - 1))).toGMTString();
}
//example $.cookie(’name’, ‘value’, {expires: 7, path: ‘/’, domain: ‘jquery.com’, secure: true});
jQuery.cookie = function(name, value, options) {
if (typeof value != 'undefined') { // name and value given, set cookie
options = options
------解决方案--------------------
{};
if (value === null) {
value = '';
options.expires = -1;
}
var expires = '';
if (options.expires && (typeof options.expires == 'number'
------解决方案--------------------
options.expires.toUTCString)) {
var date;
if (typeof options.expires == 'number') {
date = new Date();