Using form data

I am building a basic calculator within a web page that receives user input via an HTML form. When a user clicks the submit button I want the output to be rendered in a separate web page.

I have written a separate javascript file that performs the calculations on the user input. I am having trouble connecting the form data to the calculations and rendering in a new page.

Can someone please help me with an overview of how I can achieve this?

You will need to link the JS page to the HTML page. Then, you will need to use the onClick attribute to call the specific function that performs the calculations. Here are two articles about how to open a new page using JS:

  1. StackOverflow
  2. W3School

I hope this helps!