Button changing

how to change the button once the button is clicked? and the next time
no action is performed when the button is changed? is it possible? Give
me the solution with suitable code?

Thanks,