网上很多网页都能看到很多单选、复选框,曾经也写过但是单选或复选的源码,这是整合的,还有下拉、评价、课程选择
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<html><head><title>测试版基本信息</title></head>
<body>
<table align="center" width="500" border="0" cellpadding="2" cellspacing="0">
<caption align="center"><h2>测试版基本信息</h2></caption>
<form action="server.php" method="post">
<tr>
<th>姓名:</th>
<td><input type="text" name="username" sixe="20"></td>
</tr>
<tr>
<th>性别:</th>
<td><input type="radio" name="sex" value="1" checked>男
<input type="radio" name="sex" value="2">女
<input type="radio" name="sex" value="0">保密</td>
</tr>
<tr>
<th>学历:</th>
<td>
<select name="edu">
<option>--请选择--</option>
<option value="1">高中</option>
<option value="2">大专</option>
<option value="3">本科</option>
<option value="4">研究生</option>
<option value="5">其他</option>
</select>
</td>
</tr>
<tr>
<th>选修课程:</th>
<td>
<input type="checkbox" name="course[]" value="4">Linux
<input type="checkbox" name="course[]" value="5">IOS
<input type="checkbox" name="course[]" value="6">PHP
<input type="checkbox" name="course[]" value="7">JAVA
</td>
</tr>
<tr>
<th>自我评价:</th>
<td>
<textarea name="eval" rows="4" cols="40"></textarea>
</td>
</tr>
<tr>
<td colspan="2" align="center">
<input type="submit" name="submit" value="提交">
<input type="reset" name"reset" value="重置">
</td>
</tr>
</form>
</table>
</body>
</html>
版权声明:本文为博主原创文章,未经博主允许不得转载。