This works:
var d = new Date();
document.cookie = name + "=1;expires=" + d.toGMTString() + ";" + "; path=/";
But this doesn't work:
function deletecookie(name)
{
var d = new Date();
document.cookie = name + "=1;expires=" + d.toGMTString() + ";" + "; path=/";
}
deletecookie(name);
Why it doesn't work after wrapping in a function?
EDIT
Seems this only happens in firebug,is there some reason for it?