title: Pass radiobutton value from one html page to another as parameter and extract it on next html page
body: <p>I am new to HTML. I have written below code to select from one of the option. After selecting one of the radiobutton and clicking the submit button, user should get redirected to exam page with candidate type from radiobutton value being passed in URL which has to be extracted on next page. </p>
  
  <p>Can someone help me with this requirement to pass value and extract it on next page.</p>
  
  <pre><code>&lt;html&gt;
      &lt;head&gt;
          &lt;title&gt;Online Examination Portal&lt;/title&gt;
          &lt;h1&gt;Online Examination&lt;/h1&gt;
          &lt;script type="text/javascript"&gt;
              function get_action(form) {
              form.action = document.querySelector('input[name = "candidateType"]:checked').value;
          }
          &lt;/script&gt;
      &lt;/head&gt;
      &lt;body&gt;
          &lt;div&gt;Select candidate type from below option:&lt;br&gt;&lt;br&gt;
              &lt;div&gt;
                  &lt;input type="radio" name="candidateType" value="student"&gt;Student
                  &lt;br&gt;
                  &lt;input type="radio" name="candidateType" value="professional"&gt;Professional  
                  &lt;br&gt;&lt;br&gt;
                  &lt;form action="ExamPage.html" method="get"&gt;&lt;input type="submit" value="Submit" onclick="get_action(this);"&gt;&lt;/form&gt;           
                  &lt;br&gt;&lt;br&gt;
                  &lt;form action="RegistrationPage.html" method=post name="form2"&gt;&lt;input type="submit" value="Register"&gt;&lt;/form&gt;
              &lt;/div&gt;
          &lt;/div&gt;
      &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>