我有一些登录用户的代码。通过单击触发功能时发送cookie。然后,当用户注销时,我想清理这个cookie。这该怎么做?
jQuery(document).ready( function() {
var j = jQuery;
j('a.logout').click( function() {
// I want to clean the cookie that set below when user logout
)};
j("div.poll-panel a.flag").live('click',
function() {
my_get_loader().toggle();
var doc = j(this).attr('id')
doc = doc.split('-');
j.post( Docs.url, {
action: Docs.poll,
'cookie': encodeURIComponent(document.cookie),
'flag': doc[1],
'doc_id': doc[2]
},
//other_functions here
}
});