代码:

<a href="#" th:onclick="${'removeArticleImg('''+cmsImg.imgID+''')'}">删除</a>

cmsImg.imgID 为后端返回的数据,放到attribute中。

输出:

<a href="#" onclick="removeArticleImg('632b8c7aa3f94aa29712eb6c233fb922')">删除</a>

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-10-16
  • 2021-09-21
  • 2022-12-23
  • 2021-08-21
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2021-12-31
  • 2021-07-28
  • 2022-12-23
  • 2022-12-23
  • 2022-02-17
相关资源
相似解决方案