Если я понял о чём речь.)
<script>
var actionList = {
func1: function(){
alert('func1')
},
func2: function(){
alert('func2')
},
funcn: function(){
//...
},
};
document.onclick = function(event){
var target = event.target;
if(target.tagName == 'BUTTON' && target.className == 'button-class'){
var action = target.getAttribute('data-action');
if(action && actionList[action]) actionList[action]();
else console.log('No action: "' + action +'".', event);
}
}
</script>
<button class="button-class" data-action="func1">1</button>
<button class="button-class" data-action="func2">2</button>