Enable custome filed

how to Enable custome filed using java script

cur_frm.set_df_property('field_1','read_only',0);

Thanks For your answer but how to enable child table filed on refresh event.

use this command in onload event:

var df1 = frappe.meta.get_docfield("Child Table Name","field_name", cur_frm.doc.name);
df1.read_only = 1;

Thank you Sir