How can i enable one text box field while selecting yes from Yes/No drop down group?

How can i enable one text box field while selecting yes from Yes/No drop down group?

ajax -> onchange ->

if ({dropdownfield}==“yes”) {sc_field_display({textfield}, ‘off’); }