blob: cf057f6986beec265b4fed82c780547f8f28419e (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
|
<body>
<input type=button onclick="setCookie('cookie1=value1; max-age=100; path=/res/html')" value="Set Cookie 1" />
<input type=button onclick="setCookie('cookie2=value2; expires=Sat, 23 Jan 2060 08:10:36 GMT')" value="Set Cookie 2" />
<input type=button onclick="setCookie('cookie3=value3; domain=serenityos.org')" value="Set Cookie 3" />
<input type=button onclick="setCookie('cookie4=value4; httponly; secure')" value="Set Cookie 4" />
<br /><pre id=cookies></pre>
<script>
function setCookie(cookie) {
document.cookie = cookie;
document.getElementById('cookies').innerHTML = document.cookie;
}
document.getElementById('cookies').innerHTML = document.cookie;
</script>
</body>
|