Use dojo.cookie to create a cookie : Cookie « Dojo toolkit « JavaScript Tutorial






<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>








29.39.Cookie
29.39.1.Use dojo.cookie to create a cookie