-4
I have a set of checkboxes and I need a javascript function that, when submitting the form, check if at least one is checked and display the alert to select if it is not. I can’t use radio in this case, it has to be checkboxes.
<input type="checkbox" name="opção1" value="true" />
<input type="checkbox" name="opção2" value="true" />
<input type="checkbox" name="opção3" value="true" />
<input type="checkbox" name="opção4" value="true" />
<input type="submit" value="ENVIAR" />