我有一个表格,在那个复选框和按钮是存在的,点击按钮,数据是提交的,也在数据库中插入,但我的页面是刷新的,我希望我的数据应该提交并插入到数据库中,也不应该刷新页面在百里叶弹簧启动。复选框中的值在循环中显示。我当前的代码是:
<form class="myform myform-newaccount" action="#" id="myForm"
th:action="@{/authorList?buttonValue=pluginlist}"
th:object="${userModifyDto}" method="post">
<input type="checkbox" name="applicationId" th:field="*{applicationIds}" id="myCheck"
th:value="${option.applicationId}" />
<input type="submit" value="send" id="myid"/>
</form>发布于 2021-10-22 10:08:33
Thymeleaf等服务器端呈现技术的默认行为是操作总是触发页面刷新。有关这方面的更多信息,请参阅Form handling with Thymeleaf。
也就是说,有两种选择:
https://stackoverflow.com/questions/69672309
复制相似问题