1 / 5

Radio Buttons

Radio Buttons. Index = 0. Index = 1. Gender: Male &lt;input type=&quot;radio&quot; name=&quot;sex&quot; id=&quot;male&quot; value=&quot;M&quot; /&gt; Female &lt;input type=&quot;radio&quot; name=&quot;sex&quot; id=&quot;female&quot; value=&quot;F&quot; /&gt;. var message var indx message = ‘by Index using Checked property<br>‘

rozene
Télécharger la présentation

Radio Buttons

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Radio Buttons

  2. Index = 0 Index = 1 Gender: Male <input type="radio" name="sex" id="male" value="M" /> Female <input type="radio" name="sex" id="female" value="F" />

  3. var message var indx message = ‘by Index using Checked property\n‘ for (indx = 0; indx < document.getstuff.sex.length; indx++) { message = message + 'Indx=' + indx + ' checked=' + document.getstuff.sex[indx].checked + '\n‘ } alert(message)

  4. message = ‘by Index using Value property\n‘ for (indx = 0; indx < document.getstuff.sex.length; indx++) { message = message + 'Indx=' + indx + ' value=' + document.getstuff.sex[indx].value + '\n‘ } alert(message)

  5. message = ‘by d.f.id.checked\n‘ message = message + 'document.getstuff.male.checked=' + document.getstuff.male.checked + '\n‘ message = message + 'document.getstuff.female.checked=' + document.getstuff.female.checked + '\n‘ alert(message)

More Related