5
I have five radio button
, of these five one is "marked", as I do to unmark the radio button
that I clicked after clicking on another?
Example:
<fieldset>
<legend>Selecione:</legend>
<label>Morango:
<input type="radio" id="A" checked/>
</label>
<label>Maracujá:
<input type="radio" id="B" />
</label>
<label>Melancia:
<input type="radio" id="C" />
</label>
<label>Melão:
<input type="radio" id="D" />
</label>
<label>Mamão:
<input type="radio" id="E" />
</label>
</fieldset>
define the same name
– Murilo Melo
after that, put your own answer ;)
– Murilo Melo
for example: name="radio-btn"
– Murilo Melo
@Murilogambôa Grateful for the tip! It was a detail that I didn’t know, now I understand that without defining the tag
name
thechecked
is for the entire collectionradio
.– Diego Henrique
A very similar question: https://answall.com/questions/418763/como-fa%C3%a7o-para-uncheck-o-radio-button-que-%C3%A9-connected-to-other-anterior-ap%C3%b3s-select
– Reginaldo Rigo