我有来自 ispring 的 html 数据,这是交互式菜单。我观察到我有本地存储(显然是上次查看的页面)。我也有日志系统,我需要将本地存储保存在 user_id 或 sessionid 中。我发现这个:https ://www.quora.com/Is-it-possible-to-get-localstorage-key-value-into-a-php-variable-If-so-how-can-we-do-它
我试过这个:
在 window.location 也许我需要做点什么,我不知道我是否朝着正确的方向前进
我在 indexmenu.html 中还有另一个代码:
我是编程初学者,我在森林里像瞎子一样,请帮助我
<script>
var value = localStorage.getItem('myKey');
jQuery.post("indexmenu.html", {myKey: value}, function(data)
{
window.location.href='http://smartangielski.cba.pl/indexmenu/';
});
</script>
<?php if(isset($_POST["user_id"])) { $value = $_POST['myKey']; }?>
'''''''''''''''''''''''
我需要在登录页面后,从上次记录的活动中获取本地存储数据