How to detect mouse down and not release

How to detect mouse down and not release

If I want to do function when mouse click a button and not release, and stop when it relese, how to that?