在中写一个onclick 并且带上thymeleaf的参数 网上的写法千奇百怪,试了很多方法,踩了很多坑,终于还是找到了 th:οnclick="Apply([[${classrooms.classroom_id}]]);" ${classrooms.classroom_id}为thymeleaf的参数 参考: https://www.jianshu.com/p/10bfefbcecab