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






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>

   
  








Dojo-toolkit.zip( 3,849 k)

Related examples in the same category