# .buttons

[browser](../../..) ⟩ [event](../..) ⟩ [type](..) ⟩ [mouse]() ⟩ .buttons&#x20;

{% hint style="success" %}
a <mark style="color:yellow;">**number**</mark> representing mouse <mark style="color:yellow;">**button combinations**</mark>.

* each button is represented by a given number (see below).&#x20;
* if more than one button is pressed, the <mark style="color:yellow;">**button values are**</mark>**&#x20;**<mark style="color:orange;">**added**</mark>.
{% endhint %}

<img src="https://2527454625-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MfvEFZnSBhKT6fJmus0%2Fuploads%2FZCi2dqdfwpfupTKQl2Ap%2Fmouseevent.buttons.svg?alt=media&#x26;token=ae98d5c8-8719-42dc-8d3e-481f9be9a405" alt="mouseEvent.buttons" class="gitbook-drawing">

{% tabs %}
{% tab title="💈範例" %}
* [drag-the-bar](move/drag-the-bar "mention") - listen to "[**mousemove**](move)" on bar.mousedown.
{% endtab %}

{% tab title="👥 相關" %}
* compare with [.button](.button "mention") (number associated with each button)
{% endtab %}

{% tab title="📘 手冊" %}
* [Event](https://developer.mozilla.org/en-US/docs/Web/API/Event) ⟩ [UIEvent](https://developer.mozilla.org/en-US/docs/Web/API/UIEvent) ⟩ [MouseEvent](https://developer.mozilla.org/en-US/docs/Web/API/MouseEvent) ⟩
  * [.buttons](https://developer.mozilla.org/en-US/docs/Web/API/MouseEvent/buttons) - which buttons are pressed.
  * [.button](https://developer.mozilla.org/en-US/docs/Web/API/MouseEvent/button) - compare with .buttons. (#todo)
{% endtab %}
{% endtabs %}
