10 lines
409 B
JavaScript
10 lines
409 B
JavaScript
// xSetCookie, Copyright 2001-2005 Michael Foster (Cross-Browser.com)
|
|
// Part of X, a Cross-Browser Javascript Library, Distributed under the terms of the GNU LGPL
|
|
|
|
function xSetCookie(name, value, expire, path)
|
|
{
|
|
document.cookie = name + "=" + escape(value) +
|
|
((!expire) ? "" : ("; expires=" + expire.toGMTString())) +
|
|
"; path=" + ((!path) ? "/" : path);
|
|
}
|