Handlebars 템플릿에서 HTML 버튼 비활성화하는 방법?

I have a theme component using handlebars. This component is a footer and does contain a HTML form button. I need to disable this button once it has been clicked. This is usually pretty straight forward and would look like this

<!DOCTYPE html>
<html>
    <body>
        <button onclick="this.disabled=true">Click here</button>
    </body>
</html>

But that doesn’t work once it put it into the handlebars template since it can’t run javascript. So my question is how to disable the button of my footer component once it has been clicked if its defined in a handlebars template but those can’t run any javascript.

2개의 좋아요