需求:例如请求url链接为:http://localhost:8080/community/service?cid=1
如何取到url中的cid参数值呢?
一、HTML取值
<span th:text="${param.cid}"></san>
或者
<span>[[${param.cid}]]</span>
二、 JS取值
<script>
let cid=[[${param.cid}]];
console.log(cid);
</script>