Alternate of this line

        cur_frm.fields_dict.field_name.$input.on("keypress", function(evt){

This runs when an input is given to a field (as key is pressed).

I am unable to figure it out if the field is select type, ie we need to select option instead of input.
Any help

You need to get the current value of select field?

Got it, replaced keypress with click