在后台代码中,我设置Session了一些数据。Session["usedData"] = "sample data";问题是如何在javascript中获取会话值(在我的示例中为“示例数据”)并设置Session["usedData"]新值?
1 回答

呼唤远方
TA贡献1856条经验 获得超11个赞
您不能Session直接在JavaScript中访问。
您可以创建一个隐藏字段并将其传递到页面,然后使用JavaScript通过以下方式检索对象 document.getElementById
添加回答
举报
0/150
提交
取消