Javascript [removed] always empty string

前端 未结 5 1089
执念已碎
执念已碎 2020-11-30 01:53

I have this real strange problem with client side javascript setting cookies. I\'m developing a little 1 page demo at the moment to use cookies to store some \'preferences\'

5条回答
  •  忘掉有多难
    2020-11-30 02:29

    You can't set cookies by the look of things if its not running in a web server.

    file:///C:/Users/me/Desktop/demo/demo.html

    however:

    http://localhost/demo/demo.html works.

提交回复
热议问题