当前位置:网站首页>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

边栏推荐
猜你喜欢
随机推荐
POJ1287联网题解
179. 最大数
Redis学习
Pod环境变量和initContainer
pytest interface automation testing framework | parametrize source code analysis
mysql查看cpu使用情况
【Unity3D】相机
基于tika实现对文件类型进行判断
小程序更多的手势事件(左右滑动、放大缩小、双击、长按)
13 - JUC CountDownLatch concurrent programming
POJ1251丛林之路题解
巧妙利用unbuffer实时写入
将aof文件转换为命令waoffle安装和使用
自定义IP在PCIE中使用
Golang:go开启web服务
我的创作纪念日
云原生FAQ
【杭电多校第四场 B题】最短路图+缩点dp
SaaS安全认证综合指南
22牛客多校1 C.Grab the Seat (几何 + 暴力)









