我有一系列單選按鈕,其中我只希望能夠選擇1。我有他們所有的同名,所以我認爲這會做的伎倆,但我仍然可以選擇所有四個。只允許檢查一個單選按鈕HTML
<h1>Portion</h1>
<input type="radio" name="portion_num" value="2" /> Two
<input type="radio" name"portion_num" value="4" /> Four
<input type="radio" name"portion_num" value="6" /> Six
<input type="radio" name"portion_num" value="8" /> Eight
奧普斯,謝謝! –
沒問題..... –