這個(gè)為什么第二個(gè)能實(shí)現(xiàn)單選,第一個(gè)不行呢?
<form method="post" action="save.php">
<label>1.你喜歡的運(yùn)動(dòng)是:</label><br/>
<label for="run">跑步</label>
<input type="radio" name "1" value="a" id="run"/>
<label for="jump">跳遠(yuǎn)</label>
<input type="radio" name="1" value="b" id="jump"/><br/>
<label>2.你喜歡的音樂類型是:</label><br/>
<label for="liuxing">流行</label>
<input type="radio" name="2" value="d" id="liuxing"/>
<label for="shanggan">傷感</label>
<input type="radio" name="2" value="c" id="shanggan"/><br/>
<input type="submit" value="提交" name="submitBtn"/>
<input type="reset" value="重置" name="resetBtn"/>
</form>
2016-10-16
<form method="post" action="save.php">
??? <label>1.你喜歡的運(yùn)動(dòng)是:</label><br/>
??? <label for="run">跑步</label>
??? <input type="radio" name= "1" value="a" id="run"/>
??? <label for="jump">跳遠(yuǎn)</label>
??? <input type="radio" name="1" value="b" id="jump"/><br/>
??? <label>2.你喜歡的音樂類型是:</label><br/>
??? <label for="liuxing">流行</label>
??? <input type="radio" name="2" value="d" id="liuxing"/>
??? <label for="shanggan">傷感</label>
??? <input type="radio" name="2" value="c" id="shanggan"/><br/>
??? <input type="submit" value="提交" name="submitBtn"/>
??? <input type="reset" value="重置" name="resetBtn"/>
</form>
第四行的name沒有打"="看到?jīng)]
2016-10-16
<label for="run">跑步</label>
<input type="radio" name "1" value="a" id="run"/>
這里少了一個(gè)(=)號(hào)