一个form中只能有一个fieldset元素吗?
我在一个form中放置了两个fieldset元素,第一个fieldset元素内含两个label、一个text元素及一个textarea元素,第二个fieldset元素中含有两个radio元素。
具体代码如下:
<fieldset>
<legend> Your Contact Details </legend>
<div>
<label for= "author "> Name: </label>
<input name= "author " id= "author " type= "text " />
</div>
<div>
<label for= "text "> Message: </label>
<textarea name= "text " id= "text " cols= "20 " rows= "10 " />
</div>
</fieldset>
<fieldset>
<legend> Remember me: </legend>
<div>
<input id= "remember-yes " class= "radio1 " name= "remember " type= "radio " value= "yes " checked= "CHECKED " />
<label for= "remember-yes "> Yes </label>
</div>
<div>
<input id= "remember-no " class= "radio1 " name= "remember " type= "radio " value= "no " />
<label for= "remember-no "> No </label>
</div>
</fieldset>
</form>
在运行时出问题了:第二个fieldset不出现,在textarea框中显示出xml源代码:
</div>
</fieldset>
<fieldset>
<legend> Remember me: </legend>
<div>
<input id= "remember-yes " class= "radio1 " name= "remember " type= "radio " value= "yes " checked= "CHECKED " />
<label for= "remember-yes "> Yes </label>
</div>
<div>
<input id= "remember-no " class= "radio1 " name= "remember " type= "radio " value= "no " />
<label for= "remember-no "> No <