![]() |
Radio Buttons |
See source code for this script |
<script> <!-- function fu() { for( i=0; i< document.rform.rb.length; i++ ) { if (document.rform.rb[i].checked) { answer = document.rform.rb[i].value; alert(" You selected "+answer); } } } // --> </script> <form name="rform"> <input type="radio" value="yes" name="rb" checked> France <input type="radio" value="england" name="rb"> England <input type="radio" value="germany" name="rb"> Germany <input type="radio" value="italy" name="rb"> Italy <p> <input type="button" value="Get Selected Country" onClick="fu()"> </form> |
|