错误的写法:

th:onclick="'javascript:editUser('+${prod.id}+');'"

正确的写法:

th:onclick="'javascript:editUser(\''+${prod.id}+'\');'"

其实就是使用转义字符

 

参考:

http://www.cnblogs.com/clair-momo/p/7095270.html

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2021-10-09
  • 2021-11-08
  • 2022-02-22
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2021-12-25
  • 2021-12-19
  • 2021-02-21
  • 2021-12-07
  • 2021-12-03
相关资源
相似解决方案