Quantcast
Channel: Active questions tagged html - Stack Overflow
Viewing all articles
Browse latest Browse all 73845

how to pass multiple (input) values onto query string

$
0
0

I'm wondering how to pass multiple values onto a query string:

<label class="btn active">

  <input
    type="radio"
    name="location"
    id="us"
    value="us"
    checked
  />

  US

</label>

The above code correctly passes "us" onto the query string.

<label class="btn">
  <input type="radio" name="location" id="uk" value="uk" />
  UK
</label>

Radio button being passed:

$(document).ready(function() {
  $("#submitButton").click(() => {
    const val = $("input[name=location]:checked").value();
  });
});

But if I would like to pass both parameters at the same time, what would be the solution?


Viewing all articles
Browse latest Browse all 73845

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>