1、新建一个html文件,命名为demo1.html,用于讲解Javascript怎么设置cookie。
2、使用document对象中的cookie属性设置cookie。
3、运行网页,可以看到cookie设置成功。