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

边栏推荐
猜你喜欢
随机推荐
Golang: go to connect and use mysql
zip package all files in the directory (including hidden files/folders)
VoLTE基础学习系列 | 企业语音网简述
日志导致线程Block的这些坑,你不得不防
app 自动化 通过工具查看app 元素 (三)
SaaS安全认证综合指南
聊一聊ICMP协议以及ping的过程
【MySQL】操作表DML相关语句
走进音视频的世界——mp3封装格式
LabVIEW中局部变量和全局变量的分配
国内外最顶级的8大plm项目管理系统
zip打包目录所有文件(含隐藏文件/夹)
Centos install php7.4, build hyperf, forward RDS
支付宝如何生成及配置公钥证书
七夕来袭——属于程序员的浪漫
套接字选项
pytest接口自动化测试框架 | 集成Allure测试报告
最小生成树
拳头游戏免版权音乐下载,英雄联盟无版权音乐,可用于视频创作、直播
【编程之外】当遮羞布被掀开,当人们开始接受一切









