html页面怎样传递对象信息_html/css_WEB-ITnose

WBOY
Release: 2016-06-24 12:05:42
Original
1285 people have browsed it


页面全是html,那样登陆时,怎样在登陆后的页面取得登陆用户的信息?让人费解,不像jsp可以存个session,登陆后再取出来


回复讨论(解决方案)


坛友速来助阵

无论怎样,你都得和服务器交互,在服务器端,用户登录,那么便会记录session,静态页面只需要利用js+ajax去服务器段获取数据即可,而服务器只需跟用户登录后记录的SESSION来返回相应的数据到客户端

无论怎样,你都得和服务器交互,在服务器端,用户登录,那么便会记录session,静态页面只需要利用js+ajax去服务器段获取数据即可,而服务器只需跟用户登录后记录的SESSION来返回相应的数据到客户端


就是在html中不知道怎样获取session,假如这样:在login.html登陆,提交到loginAction,在loginAction验证登陆用户时,登陆成功则存到session,跳到main.html(控制页面跳转是在客户端,不在服务端),然后,怎样可以在main.html获取session保存的用户对象?


没人来

纯html就没法加jsp代码来获取session内容了,只能用ajax到后台去请求session内容。

纯html就没法加jsp代码来获取session内容了,只能用ajax到后台去请求session内容。


朋友能说详细点么? 
Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact [email protected]
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!