HTML radio button not working according to definition? -


from wikipedia:

"a radio button or option button type of graphical user interface element allows user choose 1 of predefined set of options."

http://en.wikipedia.org/wiki/radio_button

since that's want on page, used input button of type radio:

    <form id="run_units">         <input type="radio" value="1">miles          <input type="radio" value="2">kilometers     </form> 

and yet, when test page, it's allowing me select both miles , kilometers. doing wrong?

give each input name. names should equal.

    <input type="radio" name="distance" value="1">miles      <input type="radio" name="distance" value="2">kilometers 

why use name attribute? because checkbox used in forms, , each <input> should have name, sent server.


Comments

Popular posts from this blog

android - Get AccessToken using signpost OAuth without opening a browser (Two legged Oauth) -

org.mockito.exceptions.misusing.InvalidUseOfMatchersException: mockito -

google shop client API returns 400 bad request error while adding an item -