Thursday, 25 April 2013

cookie


<html>
<head>
<script type="text/javascript">
function add_cookies()
{
var name=document.f1.t1.value;
dt= new Date();
var mts=dt.getDate(dt) + 1;
dt.setDate(mts);
document.write(dt);
document.cookie="name" + "=" + name + ";expires="+dt.toUTCString();
}
</script>
</head>
<body>
<form name=f1 method=post action=''>
<input type=text name=t1><input type=button onclick='add_cookies()'; value='Add Cookies'>
</form>
<br><br>
<a href=add-cookies.htm>Add Cookies</a> | <a href=read-cookies.htm>Read Cookies</a>
</body>
</html>

No comments:

Post a Comment