当前位置:网站首页>How to get page data
How to get page data
2022-08-01 08:15:00 【Joy's sister is a rookie】
How to get the user information on the login page?
(Backend method)
What I need to do now is
After successful login on the login page
The user name I am currently logged in can be displayed on the next jump page
The method of the backend is to obtain the user information of the successful login in the login method of the controller layer and add it to the session
(Be careful to make a judgment of the empty space, otherwise it may make an error)
Add a special method to get the user stored in the session, get it through get, and return it![[External link image transfer failed, the origin site may have anti-leech mechanism, it is recommended to save the image and upload it directly (img-sCkQJ0Wz-1659262066122) (C:\Users\pon18\AppData\Roaming\Typora\typora-user-images\image-20220731174425458.png)]](/img/1d/2dce16dde62fc8b7c8abce25958c48.png)
Front-end code:
This is the part that needs to display the user, use id=root to specify the current location, and in ajax, you can use .html to return it
(id use#Get the class using .)

How to get the user name verified on the previous page when changing the password?
(Front-end method)
on next page, first use the function to get the parameters of the address bar and get the value of user
Then call this function to get the username

边栏推荐
猜你喜欢
随机推荐
pytest接口自动化测试框架 | 跳过测试类
Delphi MDI appliction documents maximize display, remove buttons such as maximize and minimize
热修复技术可谓是百花齐放
【编程之外】当遮羞布被掀开,当人们开始接受一切
372. 超级次方
Golang:go静态文件处理
MySQL查询进阶——从函数到表连接的使用你还记得吗
华为深度学习课程第六、七章
app 自动化 打开app (二)
leetcode-6133: maximum number of groupings
flink sql-client,怎么处理源端与目标增加端,sql-client包括映射表与JOB如
华为深度学习课程第九章——卷积神经网络以及案例实践
电磁兼容简明教程(6)测试项目
C语言学习概览(一)
codeforces每日5题(均1600)-第二十七天
zip打包目录所有文件(含隐藏文件/夹)
VSCode插件推荐(Rust环境)
POJ2031空间站题解
Golang:go开启web服务
pytest interface automation testing framework | pass in parameter values in the form of function return values









