怎么用JS来得到Session中的值
//在页面上先用个hidden标签,来保存要用到的SESSION中的值<s:hidden id="userIdInSe" name="#session.userId" ></s:hidden>//JS代码var id=document.getElementById("userIdInSe").value; if(id==''){ alert('您还没登陆,请先登陆再留言!!!'); window.location.href ='/blogsystem/web/others/login.jsp'; return; }
页:
[1]