react.js : javascript in angle brackets not working

后端 未结 2 417
栀梦
栀梦 2021-01-28 09:24

For some reason when I try and enter JavaScript into the angle part of the HTML portion it does not work. I\'m using Thymeleaf.

Here\'s the HTML portion:



        
2条回答
  •  一向
    一向 (楼主)
    2021-01-28 10:08

    Try this:

    
    

    you should pass an arrow function in your onClick event

提交回复
热议问题