javascript - When I get the cookie, it is null -


i want cookies have setted, when use console.log(document.cookie), value null.why? code:

document.cookie="name=hi";  document.cookie="displayname=hello";  var strcookie=document.cookie;  console.log(strcookie); //output  ''
enter image description here why? query relevant information, dont's find solution of problem.can me? thank you!


Comments

Popular posts from this blog

html - Difficulties with background-image property -

visual studio code - What does the isShellCommand property actually do and how should you use it? -

ios - Segue not passing data between ViewControllers -