<%@ page language="java" contentType="text/html; charset=UTF-8"
pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>学生个人信息</title>
<script type="text/javascript">
function checkXH(){
var a = document.getElementById("XH").value;
if(a.length == 0){
alert("学号不能为空");
}else if(a.length >6){
alert("学号不能超过6个长度");
}else if(!isNumeric(a)){
alert("输入的学号不是数字");
}
}
function checkXM(){
var a = document.getElementById("XM").value;
if(a.length == 0){
alert("姓名不能为空");
}else if(a.length>10){
alert("姓名长度不能超过10位");
}
}
// 判断输入是否为数字
function isNumeric(n) {
return !isNaN(parseFloat(n)) && isFinite(n);
} //判断姓名只能是字母 function(){ }
//兴趣不能全选
function isAllSelect(){
var ids = document.getElementsByName("XQ");
var count = 0;
for(var i=0;i<ids.length;i++){
if(ids[i].checked){
count++;
}
}
if(count == ids.length){
alert("兴趣不能全选");
}
}
</script>
</head>
<center>
<body>
<form action="#" method="POST" name="form1" onsubmit="checkXH();isAllSelect();checkXM();" >
<fieldset style="width:450px" align="center">
<legend><b>学生个人信息</b></legend>
<fieldset style="width:400px" align="left">
<legend><b>基本资料</b></legend>
<table width="400" border="0" align="center" bgcolor="#CCFFCC">
<tr>
<td width="120">学号:</td>
<td><input id="XH" type="text" ></td>
</tr>
<tr>
<td width="120">姓名:</td>
<td><input name="XM" type="text" id="XM"></td>
</tr>
<tr>
<td width="120">性别:</td>
<td><input name="XB" type="radio">男
<input name="XB" type="radio">女
</td> </tr>
<tr>
<td width="120">出生日期:</td>
<td><input name="CSRQ" type="text" value="19980624"></td>
</tr>
</table>
</fieldset> <fieldset style="width:400px" align="left">
<legend><b>详细资料</b></legend>
<table width="400" border="0" align="center" bgcolor="#CCFFCC">
<tr>
<td width="120">专业:</td>
<td>
<select name="se" size="1">
<option>计算机</option>
<option>软件工程</option>
<option>信息管理</option>
<option>通信工程</option>
<option>信息网络</option>
</td>
</tr>
<tr>
<td width="120">选修课程:</td>
<td>
<select name="XXZY" size="3" multiple="multiple">
<option>计算机导论</option>
<option>数据结构</option>
<option>数据库原理</option>
<option>操作系统</option>
<option>计算机网络</option>
</td>
</tr> <tr>
<td>备注:</td>
<td><textarea name="BZ">团员</textarea> </td>
</tr>
<tr>
<td>兴趣:</td>
<td>
<input type="checkbox" name="XQ" checked="checked">听音乐
<input type="checkbox" name="XQ">看小说
<input type="checkbox" name="XQ" checked="checked">上网
</td>
</tr>
</table>
</fieldset>
<input type="submit" value="提交" align="center">
<input type="submit" value="重置" align="center">
</fieldset>
</form>
</body>
</center>

  


html学习代码的更多相关文章

  1. java反射机制学习代码

    根据 http://www.iteye.com/topic/137944 文档进行学习 代码如下: package reflectTest; import java.lang.reflect.*; i ...

  2. 如何免费使用GPU跑深度学习代码

    从事深度学习的研究者都知道,深度学习代码需要设计海量的数据,需要很大很大很大(重要的事情说三遍)的计算量,以至于CPU算不过来,需要通过GPU帮忙,但这必不意味着CPU的性能没GPU强,CPU是那种综 ...

  3. 常用统计分析python包开源学习代码 numpy pandas matplotlib

    常用统计分析python包开源学习代码 numpy pandas matplotlib 待办 https://github.com/zmzhouXJTU/Python-Data-Analysis

  4. swift2.0 字符串,数组,字典学习代码

    swift 2.0 改变了一些地方,让swift变得更加完善,这里是一些最基本的初学者的代码,里面涉及到swift学习的最基本的字符串,数组,字典和相关的操作.好了直接看代码吧. class View ...

  5. 420小时学习代码之后:如何教你免费自学Python

    原文地址:learning-to-code-420-hours-later-how-to-teach-yourself-python-for-free 说明:有些网址需要FQ. 大约在1.5年前,我开 ...

  6. WEB前端学习代码片段记录

    1.JS设计模式片段 Function.prototype.addMethod = function (name,fn) { this.prototype[name] = fn; return thi ...

  7. OpenCV学习代码记录——人脸检测

    很久之前学习过一段时间的OpenCV,当时没有做什么笔记,但是代码都还在,这里把它贴出来做个记录. 代码放在码云上,地址在这里https://gitee.com/solym/OpenCVTest/tr ...

  8. OpenCV学习代码记录—— Snake轮廓

    很久之前学习过一段时间的OpenCV,当时没有做什么笔记,但是代码都还在,这里把它贴出来做个记录. 代码放在码云上,地址在这里https://gitee.com/solym/OpenCVTest/tr ...

  9. OpenCV学习代码记录——Hough线段检测

    很久之前学习过一段时间的OpenCV,当时没有做什么笔记,但是代码都还在,这里把它贴出来做个记录. 代码放在码云上,地址在这里https://gitee.com/solym/OpenCVTest/tr ...

  10. OpenCV学习代码记录——轮廓(contour)检测

    很久之前学习过一段时间的OpenCV,当时没有做什么笔记,但是代码都还在,这里把它贴出来做个记录. 代码放在码云上,地址在这里https://gitee.com/solym/OpenCVTest/tr ...

随机推荐

  1. Discuz! X2.5RC 全新安装图文教程

    http://www.discuz.net/thread-2660015-1-1.html 一步步教你利用Discuz X2.5建设论坛视频教程(174集) http://down.51cto.com ...

  2. i.e 和e.g 的区别

    i.e 和e.g 的区别 两者都是拉丁文缩写 i.e是id est的缩写,意思是that is. e.g是exempli gration的缩写,意思是for example;

  3. ecmall 挂件开发实例一

     (参考网上相关文章,进行测试点评,下述方法测试成功) 1:在页面上添加要展示的页面模块 <div class="left" area="bottom_foot&q ...

  4. SharePoint中使用Visio Service展示业务数据

    SharePoint中可以通过Visio Service可以在浏览器中查看Visio图,功能部署到系统中,一切安好. 而现实总是很折磨人,使用该功能后,相关使用者随后提出,Visio图能否与我的业务数 ...

  5. GOF23设计模式之命令模式(command)

    一.命令模式概述 将一个请求封装到一个对象,从而使得可用不同的请求对客户进行参数化. 二.命令模式结构 (1)Command 抽象命令类 (2)ConcreteCommand 具体命令类 (3)Inv ...

  6. linux 查看字体

    fc-list   #字体列表 fc-list :lang=zh  #中文字体 fc-match -v "字体名" # 查看字体详情

  7. js正则表达式验证大全--转载

    转载来源:http://www.cnblogs.com/hai-ping/articles/2997538.html#undefined //判断输入内容是否为空 function IsNull(){ ...

  8. Codeforces 982C(dfs+思维)

    C. Cut 'em all! time limit per test 1 second memory limit per test 256 megabytes input standard inpu ...

  9. kafka 常用命令

    Kafka 解压,进入kafka目录下的bin目录 启动zk nohup ./zookeeper-server-start.sh ../config/zookeeper.properties & ...

  10. FreeRADIUS 、DaloRADIUS 搭建记录

    一.  安装环境 系统环境:centos6.5 IP:192.168.30.242 hostname:vpn.org 软件:PPTP.LAMP均已安装.(请确保这些正常安装,并能使用). 二.  软件 ...