Code :
var now = new Date();
var time = now.getTime();
time += 3600 * 1000;
now.setTime(time);
document.cookie="username=" + value +
'; expires=" + now.toUTCString() +
"; path=/';
More Related Contents:
- How to have html popup appear over main html page?
- Browser detection in JavaScript? [duplicate]
- Comparing date part only without comparing time in JavaScript
- What is the correct term for variable shadowing in JavaScript?
- How to replace remapColums with remapColumnsByName in free jqgrid
- How to handle the `onKeyPress` event in ReactJS?
- window.onbeforeunload not working on the iPad?
- Why is useState not triggering re-render?
- AngularJS – Building a dynamic table based on a json
- Javascript – how to control how many promises access network in parallel
- Label outside arc (Pie chart) d3.js
- regex street address match
- How to publish a module written in ES6 to NPM?
- Bower: ENOGIT Git is not installed or not in the PATH
- How do I return a longitude and latitude from Google Maps JavaScript geocoder? [duplicate]
- Parentheses while calling a method in Vue
- Why the open quote and bracket for eval(‘(‘ + jsonString+ ‘)’) when parsing json string
- Understanding JS Promises
- How can I enter data into a custom-handled input field?
- Implementing jquery UI autocomplete to show suggestions when you type “@”
- How to mock Axios with Jest?
- How to delay execution in between the following in my javascript
- angularjs custom filter to check for values inside a data array
- how to add domains to next.config.js for “next/image” while using a plugin
- Diamond-square algorithm not working (rewrite code from JS to JAVA)
- JavaScript – Get size in bytes from HTML img src
- Recursive tree search in a nested object structure in JavaScript
- object destructuring: how to use intermediate nested property
- Javascript Highlight Selected Range Button
- Node JS fs module inside browser