Input text / local variables into Javascript

Input text / local variables into Javascript

  
Hello all,
i have been trying to find a way to either:

Get the fields from a form and use them in an expression with Javascript;
or
Get some local variable into an expression with Javascript;

I am pretty convinced i saw being done already, but i cant seem to find anay reference to it.


Thank you in advance.
Anyone?