Is it possible to a create session variable in JavaScript?

后端 未结 5 1510
情歌与酒
情歌与酒 2021-01-05 09:50

Is it possible to create and update a session variable in JavaScript? Just like in PHP as I start sessions and initialize session variable.

I\'m using some JavaScrip

5条回答
  •  無奈伤痛
    2021-01-05 10:21

    You could use the js via the ajax way from/to load/post to a php script and write your session control method into this php script file.

    You could try the jQuery's $.ajax() method, I guess it is the easy way to made it on the front-end script.

提交回复
热议问题