文本框格式问题(1)
jsp 单选按钮、下拉列表、复选框、全选
1、单选按钮
------------------------------------------------------------------------------------
<tr>
<td>选项名称</td>
<td>
<input type="radio" name="sex" value="1">1
<input type="radio" name="sex" value="2">2
<input type="radio" name="sex" value="3">3
<input type="radio" name="sex" value="4">4
......
</td>
</tr>
-------------------------------------------------------------------------------------
2、下拉列表
---------------------------------------------------------------------------------------
<tr>
<td>学生年龄</td>
<td>
<select name="city" id="city">
<option value = "1">1</option>
<option value = "2">2</option>
<option value = "3">3</option>
<option value = "4">4</option>
</select>
</td>
</tr>
-----------------------------------------------------------------------------------
3、复选框
-----------------------------------------------------------------------------------
<tr>
<td>爱好</td>
<td>
<!-- 全选 -->
<script type="text/javascript">
function selectAll()
{
var s=document.getElementsByName("like");
for (var i= 0; i <s.length; i++)
{
s[i].checked=document.getElementsByName("all");
}
}
</script<!--复选框-->
<input type="checkbox" name="all" value="全选" οnclick="selectAll()">全选
<input type="checkbox" name="like" value="看书" id="1">看书
<input type="checkbox" name="like" value="打球" id="2">打球
<input type="checkbox" name="like" value="游戏" id="3">打游戏
<input type="checkbox" name="like" value="游泳" id="4">游泳
</td>
</tr>
-----------------------------------------------------------------------------------