Saved Bookmarks
| 1. |
Ram creates a web page to record the sex of a student. But he has made a mistake that the student can select both male and female choices at a time. What is the reason for the same? Help him to correct the mistake. |
|
Answer» To record sex of student radio buttons are used. Usually radio buttons are provided as a group from which exactly one can be selected at a time by giving the same name for both radio buttons. But here Ram did not give same narfie for both buttons. Therefore the mistake. The correct code is as follows, <HTML> <HEAD> <TITLE>RADIO BUTTON</TITLE> </HEAD> <BODY> sex<input type=”radio” name=’’sex” value= “Male”> Male <input type=”radio” name=”sex” value= “Female”> Female </BODY> </HTML |
|