JS获取url中的请求参数,以及整合thymeleaf获取model中的属性值
项目场景:
记录一下前端如何读取url上的参数以及使用thymeleaf模板下如何接受model属性值
解决方案:
1.window.location方法
URL又叫做统一资源定位符
完整的组成部分是scheme://host:port/path?query#fragment
具体实现
window.location.href: 返回地址栏中整个URL值
eg:http://www.baidu.com:80/view.asp?id=209#cmt1323
window.location.prot
原创
2020-10-24 14:36:09 ·
984 阅读 ·
0 评论