# Onclick 속성을 가진 버튼 추가하기

**URL:** <https://meta.discourse.org/t/adding-a-button-with-onclick/146107>\
**Category:** Product Support\
**Created:** [3월 30, 2020, 8:45오전 UTC](https://meta.discourse.org/t/adding-a-button-with-onclick/146107 "2020-03-30T08:45:25Z")\
**Posts on this page:** 1\
**Showing post:** 1

<div class="post-metadata">

**Author:** ![Fausto\_Dassenno](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/fausto_dassenno/32/166480_2.png) [@Fausto\_Dassenno](https://meta.discourse.org/u/Fausto_Dassenno)\
**Post date:** [3월 30, 2020, 8:45오전 UTC](https://meta.discourse.org/t/adding-a-button-with-onclick/146107/1 "2020-03-30T08:45:25Z")

</div>

여기서 뭔가 중요한 걸 놓치고 있는 것 같습니다.  
버튼을 추가하고 onclick 이벤트를 연결하려고 합니다.

컴포넌트의 HTML에 다음을 추가했습니다:

`<button id="button_test" class="bottone">Prova</button>`

그리고 /head에 다음을 추가했습니다:

```
$('#button_test').on('click', moreDetails);
function moreDetails(e){
console.log(`Listening to: ${e.target.value}`);
}

```

하지만 아무것도 트리거되지 않습니다.

제가 이 정도인 건가요?

F.

---

_[View the full topic](https://meta.discourse.org/t/adding-a-button-with-onclick/146107)._
