i want add if / else if in radio button when click
if i click checked Radio Value "Radio 1" i can click radio value "Radio Sub 1" or "Radio Sub 2" and Disable text box "more"
if i click checked Radio Value "Radio 2" disable text box "more" and disable radio value "Radio Sub 1" or "Radio Sub 2" (Sub Radio)
if i click checked Radio Value "Radio 3" i can type in text box "more" and disable radio value "Radio Sub 1" or "Radio Sub 2" (Sub Radio)
else i don't checked radio must disable text box "more" and disable radio value "Radio Sub 1" or "Radio Sub 2" (Sub Radio)
This is my code
<input type="radio" name="myradio" value="Radio 1" >
<label>Radio 1</label>
<input type="radio" name="mysubradio" value="Radio Sub 1" >
<label>Radio Sub 1</label>
<input type="radio" name="mysubradio" value="Radio Sub 2" >
<label>Radio Sub 2</label>
<br/><br/>
<input type="radio" name="myradio" value="Radio 2" >
<label>Radio 2</label> <br/><br/>
<input type="radio" name="myradio" value="Radio 3" >
<label>Radio 3</label>
<input name="more" placeholder="more" maxlength="50" type="text" >
You can test code in here Js Fiddle
Help me, Thank's :)
Aucun commentaire:
Enregistrer un commentaire