can a radio button click add a value to a textfield?

can a radio button click add a value to a textfield?

I'm not sure if this is possible.
If I have a radio button field with Yes/No selections.  If either is selected, a fieldset appears with a textfield.
If No is clicked, then the user types in a value in the textfield.

Is there jquery I can use, so that if the user clicks Yes, a value is entered into the textfield?

Thanks in advance.  I've seen this done before except with span tags.  I haven't seen this inside a textfield.

Peter T