Need help with code to get the current date and the current date + 1 day (in GMT).
var now = new Date();
var newexp = (now + 3);
var show = newexp.getGMTString();
alert(show);
Goal is to set a cookie to expire in 1 day.
function SetCookie(name, value, exp) {
var now = new Date();
var newexp = (now + exp); // exp being # of days before expiration
document.cookie= name + "=" + value+ "; expires=" + newexp.getGMTString() + ";"
}
SetCookie('name', 'john', '3');
Having issues with the code, need assistance.