将jquery值传递给thymeleaf

pgx2nnw8  于 2021-07-08  发布在  Java
关注(0)|答案(0)|浏览(263)

我有这样的jquery代码

$(document).ready(function(){
    $('#viewModal').on('show.bs.modal',function(e){
        $('.row-select input:checked').each(function() {
            var i = $(this).closest("tr").index()-1;
            alert(i);
        })
    })
})

我有一个程序,它使用的是这样的:

<label th:each="dataBarangModel:${ListDataBarangModel[i].kodeBarang}" th:text="${dataBarangModel}"></label>

如何将jquery代码中变量i的值传递给eleaf代码中的变量i?

暂无答案!

目前还没有任何答案,快来回答吧!

相关问题