# Assigning same eventlistener to multiple btns?

**URL:** <https://forum.kirupa.com/t/assigning-same-eventlistener-to-multiple-btns/307944>\
**Category:** Uncategorized\
**Created:** [April 13, 2010, 11:38pm UTC](https://forum.kirupa.com/t/assigning-same-eventlistener-to-multiple-btns/307944 "2010-04-13T23:38:35Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![oluc](https://avatars.discourse-cdn.com/v4/letter/o/cc9497/32.png) [@oluc](https://forum.kirupa.com/u/oluc)\
**Post date:** [April 13, 2010, 11:38pm UTC](https://forum.kirupa.com/t/assigning-same-eventlistener-to-multiple-btns/307944/1 "2010-04-13T23:38:35Z")

</div>

Hey!  
If you had a set of buttons called: bt1, bt2, bt3 etc all the way to “bt11” and you wanted to assign the same eventlistener to all of them how would you go about this? ie:

bt1.addEventListener(MouseEvent.CLICK, closeShutters);  
bt2.addEventListener(MouseEvent.CLICK, closeShutters);  
bt2.addEventListener(MouseEvent.CLICK, closeShutters);  
etc (too repetitive)

Thanks for any help!
