var fun = { one: function() { alert(1) }, two: function() { alert(2) }, three: function() { alert(3) } }, run = 'two'; if(run == 'one' || run == 'two' || run == 'three') fun[run]();