Go to "Custom attributes" of the field configuration area -> orange arrow bellow and add something like onchange="yourfunction(this)";  For e.g. onclick event , change first part to onclick.

This will call your function with element passed to it when value changes (is clicked when event is onclick).

If your function is not already defined you can add it using code pack plugin http://www.seblod.com/products/1854 or add it to template directly