---
title: thymeleaf中onclick调用js函数时传参
date: 2018-08-23 15:01:24
categories: thymeleaf
tags:
- onclick
---
以往都是用+号来拼接,实际上thymeleaf里也支持下面的这种写法。
<button th:onclick="@{javascript:edit('{prodNo}')(prodNo = ${item.prodNo})}">修正</button>
---
title: thymeleaf中onclick调用js函数时传参
date: 2018-08-23 15:01:24
categories: thymeleaf
tags:
- onclick
---
以往都是用+号来拼接,实际上thymeleaf里也支持下面的这种写法。
<button th:onclick="@{javascript:edit('{prodNo}')(prodNo = ${item.prodNo})}">修正</button>