Is it possible to change a function with a btn?

say if I created a function,and I want to change its parameter using a button.
Is this possible?
Thank you.