Modifying a form field and submitting the form using java script

Hi

I want to modifying a form field and submitting the form using java
script. I know I can do this use basic HTML form code but I want to do
it using the rails way.