How to make a mold?

The form contains several radiobutton-s United in a group (for example all the name var and the value of var1, var2, var3). Form makes a request to the server via normal submit. It is necessary that the parameter in the query was something like var: var1. If I am not mistaken in this case will be sent to all 3 values?

And what if I need to send the checked value of checkbox in the same way? For example name="check" in the request parameter should be something like check true (depending on checked). Also because it doesn't work like...

Ie such things only using js to form necessary?
July 2nd 19 at 13:10
2 answers
July 2nd 19 at 13:12
Solution
> If I am not mistaken in this case will be sent to all 3 values?

one the selected value will fly away.

with a checkbox: if checked - will be true, otherwise, would not exist the variable
Yes, you are right, thank you. It was not possible to protest, now looked true... But what if the list of checkboxes? I.e. the query should be something like var: [ 1, 2, 3] I have tried nothing seems to work. - Adrian.Bogisich commented on July 2nd 19 at 13:15
No, everything works fine. Thank you very much! - Adrian.Bogisich commented on July 2nd 19 at 13:18
:
<input type="checkbox" name="var[]" value="1">
<input type="checkbox" name="var[]" value="2">
<input type="checkbox" name="var[]" value="3">
- kaia_Mull commented on July 2nd 19 at 13:21
July 2nd 19 at 13:14
I don't quite understand the question, but in any manual on this topic on the fingers explain everything you have described, w3schools, MDN.

Find more questions by tags HTML