Answers for "one checkbox to select all input type"

1

select all inputs that arent checkboxes

document.querySelectorAll('input:not([type="checkbox"])');
Posted by: Guest on July-22-2020
0

how to select only one checkbox in html

It's easier to use type='radio' with the same value at 'name' attribute.

The selected value is the value that the 'variable' input_name has.

You can parse the selected value by name. Like: document.getElementsByName('input_name')

<input name='input_name' type='radio'>
<input name='input_name' type='radio'>
<input name='input_name' type='radio'>
<input name='input_name' type='radio'>
<input name='input_name' type='radio'>
Posted by: Guest on July-06-2021

Code answers related to "one checkbox to select all input type"

Code answers related to "TypeScript"

Browse Popular Code Answers by Language