Getting the sum of all radio button values to display in a table

后端 未结 3 2013
Happy的楠姐
Happy的楠姐 2021-01-29 13:14

I have some radio buttons in a table and I’ve set a value to them. When the user selects them and clicks the submit button, I want the sum of those values to show in another tab

3条回答
  •  长情又很酷
    2021-01-29 13:45

    You can create a function that you'll call on click in that you can use

    if (document.getElementById('a1_1_0').checked) { value = document.getElementById('a1_1_0').value; }

    And so on for all the Radiobuttons

提交回复
热议问题