<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<link href="CSS/style.css" rel="stylesheet" type="text/css">
<title>表单注册</title>
<style type="text/css">
<!--
.style1 {color: #FF0000}
-->
</style>
<script type="text/javascript">
<!--
function SelectSubmit(){
document.all.registerForm.submit();
return true;
}
function submit1(){
if(!checkusername()){
alert("用户名不合法");
return false
}
if(document.all.username.value.length==0){
alert("请填写用户名!");
return false;
}
if(document.all.realname.value.length==0){
alert("请填写真实姓名!");
return false;
}
if(document.all.password1.value.length==0){
alert("请填写密码!");
return false;
}
if(document.all.password2.value.length==0){
alert("请填写密码!");
return false;
}
if(document.all.tel.value.length==0){
alert("请填写联系电话!");
return false;
}
if(!checktel(document.all.tel.value)){
alert("电话输入不合法!电话为8位以上数字");
return false;
}
if(document.all.mail.value.length==0){
alert("请填写电子邮件!");
return false;
}
if(document.all.lxdz.value.length==0){
alert("请填写联系地址!");
return false;
}
if(document.all.password1.value!=document.all.password2.value){
alert("两次密码输入不相符!");
return false;
}
if(!checkemail(registerForm.mail.value)){
alert("您输入Email地址不正确!");registerForm.mail.focus();return false;
}
if(!checkeurl(document.all.grzy.value)){
alert("个人主页地址输入不正确!");
return false;
}
}
function checkemail(email){
var str=email;
var Expression=/\w+([-+.']\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*/;
var objExp=new RegExp(Expression);
if(objExp.test(str)==true){
return true;
}else{
return false;
}
}
function reset(){
document.all.registerForm.reset();
}
function checkusername(){
if(document.registerForm.username.value.length!=0){
var str=document.registerForm.username.value;
//在JavaScript中,正则表达式只能使用"/"开头和结束,不能使用双引号
var Expression=/^(\w){3,10}$/;
var objExp=new RegExp(Expression);
if(objExp.test(str)==true){
return true;
}else{
alert("用户名只可以输入3-10位数字、字母和下划线");
return false;
}
}else{
alert("请输入用户名");
return false;
}
}
function checktel(tel){
var str=tel;
//在JavaScript中,正则表达式只能使用"/"开头和结束,不能使用双引号
var Expression=/(\d{3}-)?\d{8}|(\d{4}-)(\d{7})/;
var objExp=new RegExp(Expression);
if(objExp.test(str)==true){
return true;
}else{
return false;
}
}
function checkeurl(url){
var str=url;
//在JavaScript中,正则表达式只能使用"/"开头和结束,不能使用双引号
//判断url地址的正则表达式为:http(s)?://([\w-]+\.)+[\w-]+(/[\w- ./?%&=]*)?
//下面的代码中应用了转义字符"\"输出一个字符"/"
var Expression=/http(s)?:\/\/([\w-]+\.)+[\w-]+(\/[\w- .\/?%&=]*)?/;
var objExp=new RegExp(Expression);
if(objExp.test(str)==true){
return true;
}else{
return false;
}
}
function testTextArea(textArea){
if(textArea.value.length>textArea.getAttribute("maxlength")){
alert("超出最大字数");
}
}
//-->
</script>
</head>
<body bgcolor="#FFFFFF" leftmargin="0" topmargin="0" marginwidth="0"
marginheight="0">
<table id="__01" width="1002" border="0" cellpadding="0"
cellspacing="0">
<form action="#" method="post" name="registerForm" >
<tr>
<td rowspan="2">
<img src="images/zc_01.gif" width="448" height="484">
</td>
<td width="554" height="484" valign="top"
background="images/zc_02.gif">
<table width="100%" border="0" height="374">
<tr>
<td width="64" class="zczi">
用 户 名:
</td>
<td width="152">
<input name="username" type="text" size="24" maxlength="10"
value="">
</td>
<td colspan="3">
<span class="style1">* <!-- input type="button"
name="Submit3" value="检查用户名"
onClick="window.location.href='checkuser.do?username='+registerForm.username.value"-->
<input type="button"
name="Submit3" value="检查用户名"
onClick="return checkusername();">
</span><span class="zi"> </span>
</td>
</tr>
<tr>
<td class="zczi">
真实姓名:
</td>
<td>
<input name="realname" type="text" size="24" maxlength="10">
</td>
<td colspan="3">
<span class="style1">*</span>
</td>
</tr>
<tr>
<td class="zczi">
密 码:
</td>
<td>
<input name="password1" type="password" size="13" maxlength="6" oncopy="return false" oncut="return false" onpaste="return false" style=" font-family:Wingdings;">
</td>
<td colspan="3">
<span class="style1">*</span>
</td>
</tr>
<tr>
<td class="zczi">
密码确认:
</td>
<td>
<input name="password2" type="password" size="13" maxlength="6" oncopy="return false" oncut="return false" onpaste="return false" style=" font-family:Wingdings;">
</td>
<td colspan="3">
<span class="style1">*</span>
</td>
</tr>
<tr>
<td class="zczi">
性 别:
</td>
<td>
<input name="sex" type="radio" value="1" checked
style="border-style:dotted ">
<span class="zczi">男</span>
<input type="radio" name="sex" value="2"
style="border-style:dotted ">
<span class="zczi">女</span>
</td>
<td colspan="3">
</td>
</tr>
<tr>
<td class="zczi">
联系电话:
</td>
<td>
<input name="tel" type="text" size="24" maxlength="15">
</td>
<td colspan="3">
<span class="style1">*</span>
</td>
</tr>
<tr>
<td>
<span class="zczi">OICQ号:</span>
</td>
<td>
<input name="qq" type="text" size="24" maxlength="10">
</td>
<td colspan="3">
</td>
</tr>
<tr>
<td rowspan="2" class="zczi">
选择头像:
</td>
<%
String tx = (String) session.getAttribute("tx");
%>
<td height="34">
<%
if (session.getAttribute("tx") == null)
%>
<img src="images/touxiang/2.gif" id="img">
</td>
<td width="57" align="left" class="zczi">
签名档:
</td>
<td width="252" rowspan="2" valign="bottom">
<textarea name="signature" rows="5" maxlength="10" onkeypress="testTextArea(this)"></textarea>
</td>
<td width="7">
</td>
</tr>
<tr>
<SCRIPT language=javascript>
//通过下拉列表选择头像时应用该函数
function showlogo(){
document.registerForm.img.src="images/touxiang/"+document.registerForm.tx.options[document.registerForm.tx.selectedIndex].value;
}
</SCRIPT>
<td>
<select name="tx" class="zczi" style="width:65px "
onChange="showlogo();">
<option value="0.gif">
头像0.gif
</option>
<option value="1.gif">
头像1.gif
</option>
<option value="2.gif">
头像2.gif
</option>
<option value="3.gif">
头像3.gif
</option>
<option value="4.gif">
头像4.gif
</option>
<option value="5.gif">
头像5.gif
没有合适的资源?快使用搜索试试~ 我知道了~
javascript开发技术大全(令附源码)
共756个文件
html:230个
htm:154个
jpg:149个
需积分: 10 7 下载量 4 浏览量
2013-06-28
16:34:09
上传
评论
收藏 10.59MB RAR 举报
温馨提示
javascript开发技术大全(最新)是很适合初学者学习的一本材料,程序员也可以作为学习javascript开发技术的工具参考书
资源推荐
资源详情
资源评论
收起资源包目录
javascript开发技术大全(令附源码) (756个子文件)
mouse.ani 170KB
1.bmp 2.12MB
1.bmp 1.34MB
1.bmp 575KB
2.bmp 335KB
2.bmp 262KB
asp.bmp 48KB
ExampleApplet.class 600B
style.css 3KB
style.css 3KB
style.css 3KB
style.css 3KB
style.css 2KB
style.css 2KB
style.css 2KB
style.css 2KB
style.css 963B
style.css 576B
css.css 434B
style.css 282B
style.css 282B
style.css 282B
style.css 282B
style.css 282B
sheet.css 153B
sheet.css 153B
sheet.css 153B
sheet.css 153B
sheet.css 153B
sheet.css 153B
progress.css 140B
Thumbs.db 140KB
Thumbs.db 66KB
Thumbs.db 60KB
Thumbs.db 60KB
Thumbs.db 47KB
Thumbs.db 32KB
Thumbs.db 25KB
Thumbs.db 15KB
Thumbs.db 14KB
Thumbs.db 14KB
Thumbs.db 14KB
Thumbs.db 13KB
Thumbs.db 12KB
Thumbs.db 12KB
Thumbs.db 11KB
Thumbs.db 11KB
Thumbs.db 11KB
Thumbs.db 10KB
Thumbs.db 10KB
Thumbs.db 10KB
Thumbs.db 10KB
Thumbs.db 9KB
Thumbs.db 9KB
Thumbs.db 8KB
Thumbs.db 8KB
Thumbs.db 8KB
Thumbs.db 8KB
Thumbs.db 8KB
Thumbs.db 7KB
Thumbs.db 6KB
Thumbs.db 6KB
Thumbs.db 6KB
Thumbs.db 6KB
Thumbs.db 6KB
Thumbs.db 5KB
Thumbs.db 5KB
Thumbs.db 5KB
Thumbs.db 5KB
Thumbs.db 5KB
Thumbs.db 5KB
Thumbs.db 4KB
第24章 javascript与XML.doc 1.06MB
01.gif 50KB
index_03.gif 29KB
top_bg.gif 29KB
header.gif 27KB
footer.gif 26KB
Mymouse.gif 26KB
Mymouse.gif 26KB
Mymouse.gif 26KB
dl.gif 19KB
18.gif 19KB
17.gif 18KB
top.gif 12KB
banner_bg.gif 11KB
zc_01.gif 9KB
waichu.gif 7KB
index_05_03.gif 7KB
main_booksort.gif 5KB
board_title.gif 5KB
skintop2.gif 5KB
waichuan_add.gif 4KB
2.gif 3KB
16.gif 3KB
4.gif 3KB
zc_02.gif 3KB
reg.gif 3KB
reg.gif 3KB
skintop3.gif 3KB
共 756 条
- 1
- 2
- 3
- 4
- 5
- 6
- 8
资源评论
批萨林
- 粉丝: 1
- 资源: 8
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功