一个关于jsp radio 的提问

来源:百度知道 编辑:UC知道 时间:2024/05/27 15:00:09
<%@ page contentType="text/html;charset=GB2312" %>
<html>
<body bgcolor=cyan><font size=4>
<center>
<p>以下谁得过处分
<form method="post" action="b.jsp">
<input type="radio" name="a" value="a">
<input type="radio" name="b" value="b">
<input type="radio" name="c" value="c">
<input type="radio" name="d" value="d" selected="x">
<br>
<input type="submit" name="T" value="确认"></center>
</form>
</font>
</body>
</html>
请问高手,这个复选按扭存在一个问题,就是选上以后就不能取消选择了,应怎么解决?谢谢了

看看这个例子 你写的是单选 ,同属于一个选择的name 都是一样的。

<%@ page contentType="text/html;charset=GB2312" %>
<html>
<body bgcolor=cyan><font size=4>
<center>
<p>以下谁得过处分
<form method="post" action="b.jsp">
<input type="radio" name="a" value="a">
<input type="radio" name="a" value="b">
<input type="radio" name="a" value="c">
<input type="radio" name="a" value="d" selected="x">
<br>

<input name="zz" type="checkbox" value="a">
<input name="zz" type="checkbox" value="2">
<input name="zz" type="checkbox" value="3">
<input type="submit" name="T" value="确