Custom Script on Text Box Event

I have a custom script which I want to run only when a particular text box’s value changes or on its tax change event it should run.