当我点击另一个单选按钮时,为什么我的单选按钮没有取消选择?

时间:2013-06-12 00:14:31

标签: html html5

当我选择另一个单选按钮时,不会取消选择单选按钮。

<div style="margin: 40px 40px 5px 40px;">
      <form> 
        <div style="">
          <div style="float: left;"><input type="radio"></div>
          <div style="">
        <label style="font-size: 24px">Email my gift</label>
          <div style="font-size: 16px; line-height: 137%;">
  <p>Send my friend a gift email message, including all the info they'll need to get up and running on Viddir.</p>
  <p><label for="email_input">Recipient's email address</label></p>
          <p><input type="text" size="24"></p>
      </div>
      </div>
      </div>
        <br />
        <br />
        <br />
        <input type="radio">
    <label style="font-size: 24px;">Send gift through Viddir</label>
        <div style="font-size: 16px; line-height: 137%;">
      <p>Send my friend a gift message directly to their Viddir account.</p>
      <p style="font-style: italic;">Note: This option also sends an email message, to be sure your friend sees your gift as soon as possible.</p>
      </div>
        <br />
        <br />
        <br />
        <br />
        <input type="radio">
        <label style="font-size: 24px;">Save for later</label>
        <p style="font-size: 16px;">Save your gift for later. You can access it through the gifts tab.</p>
    </div>
        <br />
        <br />
        <br />
        <br />
        <div style="width: 116px; margin: 0 auto;">
      <input type="submit" value="Continue" class="btn btn-success btn-large">
    </form>
    </div>

1 个答案:

答案 0 :(得分:13)

具有相同name的无线电被视为一组。当您选择一个按钮时,同一组中的所有其他按钮都将被取消选择。

相关问题