Need help on files

My problem here is i have a html file whith hidden parameters. What i want to do is

  1. i want to save one of the hidden parameters values into a file.
  2. save the file locally.
  3. i want to choose the location of the file where i want to save it.

Any suggitions,
Thank you.