JavaScript Tutorial/Dojo toolkit/Cookie
Use dojo.cookie to create a cookie
<html>
<head>
<script type="text/javascript">
var djConfig = {
baseScriptUri : "js/dojo/"
};
</script>
<script type="text/javascript" src="js/dojo/dojo/dojo.js"></script>
</head>
<body>
<script>
dojo.require("dojo.cookie");
dojo.cookie("myCookie", "This is my cookie", { expires : 5 });
alert(dojo.cookie("myCookie"));
</script>
</body>
</html>