JavaScript中表格的应用
来源:互联网 发布:域名管理后台 编辑:程序博客网 时间:2024/06/05 16:24
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>无标题文档</title>
<style type="text/css">
<!--
td { text-align:left;}
-->
</style>
<script language="javascript">
function cleck()
{
//验证*是否为空
if(frm.username.value=="")
{
alert("姓名不能为空!");
}
else
alert("姓名:"+frm.username.value)
if(frm.userage.value=="")
{
alert("年龄不能为空!");
}
else
alert("年龄:"+frm.userage.value)
if(frm.usercity.value=="")
{
alert("您所在的城市不能为空!");
}
else
alert("所在城市:"+frm.usercity.value)
if(frm.userphone.value=="")
{
alert("联系电话不能为空!");
}
else
alert("联系电话:"+frm.userphone.value)
if(frm.address.value=="")
{
alert("通讯地址不能为空!");
}
else
alert("通讯地址:"+frm.addresse.value)
}
</script>
</head>
<body>
<form name="frm">
<center>
<table border="1" cellpadding="1" cellspacing="1" >
<tr bgcolor="#66CCFF"><td colspan="2">基本资料</td></tr>
<tr>
<td align="right">姓名</td>
<td><input type="text" name="username" value="" > <font color="#FF0000" size="-1">*</font></td>
</tr>
<tr>
<td align="right">身份</td>
<td>
<input type="radio" name="身份" value="0" checked >在校教师
<input type="radio" name="身份" value="1" >退休教师
<input type="radio" name="身份" value="2" >在校学生
</td>
</tr>
<tr>
<td align="right">年龄</td>
<td align="left">
<input type="text" name="userage" value="" />岁<font color="#FF0000" size="-1">*</font></td>
</tr>
<tr>
<td align="right">经验</td>
<td>
<input type="text" id="userjingyan" />
</td>
</tr>
<tr>
<td align="right">您的学历</td>
<td>
<select name="userxueli">
<option id="学历" value="0">不限
<option id="学历" value="1" >大专
<option id="学历" value="2" >本科
<option id="学历" value="3" >硕士
<option id="学历" value="4" >博士
</select>
</td>
</tr>
<tr>
<td align="right">专业</td>
<td>
<select name="userzhuanye">
<option id="专业" value="0" selected>不限
<option id="专业" value="1" >计算机
<option id="专业" value="2" >电子技术
<option id="专业" value="3" >旅游专业
<option id="专业" value="4" >工程建设
<option id="专业" value="5" >体育
<option id="专业" value="6" >法律
</select>
</td>
</tr>
<tr>
<td align="right">您所在的城市</td>
<td>
<input type="text" name="usercity" value=""/><font color="#FF0000" size="-1">*</font>
</td>
</tr>
<tr>
<td align="right">您的性别</td>
<td>
<input type="radio" name="sexm" value="0" checked >男
<input type="radio" name="sexw" value="1" >女
</td>
</tr>
<tr>
<td align="right">原教的科目</td>
<td>
<input type="checkbox" name="books" value="0" checked />语文
<input type="checkbox" name="books" value="1" />数学
<input type="checkbox" name="books" value="2" />英语
<input type="checkbox" name="books" value="3" />物理
<input type="checkbox" name="books" value="4" />化学
<input type="checkbox" name="books" value="5" />生物<br>
<input type="checkbox" name="books1" value="0" />政治
<input type="checkbox" name="books1" value="1" />历史
<input type="checkbox" name="books1" value="2" />地理
<input type="checkbox" name="books1" value="3" />音乐
<input type="checkbox" name="books1" value="4" />体育
<input type="checkbox" name="books1" value="5" />美术<br />
<input type="checkbox" name="books2" value="0" />计算机
<input type="checkbox" name="books2" value="1" />成人高考
<input type="checkbox" name="books2" value="2" />心理辅导
<input type="checkbox" name="books2" value="3" />其他科目
</td>
</tr>
<tr>
<td align="right">要教的其它科目</td>
<td>
<input type="text" id="otherbook" />
</td>
</tr>
<tr>
<td align="right">联系电话</td>
<td>
<input type="text" id="userphone" value=""/><font color="#FF0000" size="-1">*</font>
</td>
</tr>
<tr>
<td align="right">其它联系方式</td>
<td>
<input type="text" id="otherphone" value=""/>
</td>
</tr>
<tr>
<td align="right">电子邮件</td>
<td>
<input type="text" id="email" value=""/>
</td>
</tr>
<tr>
<td align="right">通讯地址</td>
<td>
<input type="text" name="address" value=""/><font color="#FF0000" size="-1">*</font>
</td>
</tr>
<tr>
<td align="right">邮政编码</td>
<td>
<input type="text" id="code" value=""/>
</td>
</tr>
<tr>
<td align="center" colspan="2">
<input type="submit" value="确定" onclick="cleck()" />
<input type="reset" value="重填"/>
</td>
</tr>
</table>
</center>
</form>
</body>
</html>
- JavaScript中表格的应用
- 《JavaScript学习笔记》:表格的应用
- JavaScript中操作表格
- javascript eval函数的应用,循环合并表格内容
- javascript中prototype的应用
- javascript中this的应用
- javascript 中delete的应用
- javascript中Map的应用
- Javascript中transducer的应用
- javascript構建帶行號的表格
- JavaScript中怎么样在表格控制光标的移动
- javascript实现表格中,行的排序和汇总
- javascript获取表格中元素的行号和列号
- (26)JavaScript中表格方便的操作方式
- Javascript合并表格中具有相同内容的单元格
- 在JavaScript中创建表格
- 在JavaScript中删除表格
- NPOI的表格应用
- 安装vs2005 sp1 出现错误 1718
- ASSMBLY LANGUAGE
- 经典的MYSQL语句
- Assembly Language Step-by-step: Programming with DOS and Linux
- MySQL的datetime设置当前时间为默认值
- JavaScript中表格的应用
- windows mobile平台下amr语音编解码测试程序(支持录音,VOIP实时语音)
- javascript获取鼠标的位置
- 函数指针 指针函数 函数模板 模板函数 类模板 模板类
- javad处理日期时间
- Everything和Total commander整合
- oracle %type
- 微软strlen函数实现
- ASP.NET开发中URL被截取或乱码的解决方案