⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 userreg.jsp

📁 GJM-OA网络自动化办公系统 Ver 0.02 (JSP Version)
💻 JSP
字号:
<%@ page contentType="text/html;charset=gb2312" %>
<%@ page import="java.lang.*" %>
<jsp:useBean id="sqlbean" scope="session" class="org.zhengmao.soft.sqlcon" />
<%
String strSql="select * from bumen";
sqlbean.executeQuery(strSql);
%>
<html><head><title>Gjm-OA络办公系统----申请帐号</title>
<script language=javascript src="mouse.js"></script>

<script Language="javaScript">
    function  validate()
    {
        if  (document.myform.name.value=="")
        {
            alert("姓名不能为空");
            document.myform.name.focus();
            return false ;
        }
        if  (document.myform.Userid.value=="")
        {
            alert("登录帐号不能为空");
            document.myform.Userid.focus();
            return false ;
        }
		if  (document.myform.company.value=="")
        {
            alert("单位名称不能为空");
            document.myform.company.focus();
            return false ;
        }
		if  (document.myform.tel.value=="")
        {
            alert("电话号码不能为空");
            document.myform.tel.focus();
            return false ;
        }
		if  (document.myform.email.value=="")
        {
            alert("电子邮件不能为空");
            document.myform.email.focus();
            return false ;
        }
		if  (document.myform.question.value=="")
        {
            alert("密码问题不能为空");
            document.myform.question.focus();
            return false ;
        }
		if  (document.myform.answer.value=="")
        {
            alert("密码答案不能为空");
            document.myform.answer.focus();
            return false ;
        }
        if  (document.myform.password.value=="")
        {
            alert("密码不能为空");
            document.myform.password.focus();
            return false ;
        }
               return  true;
    }
    
    function onTel(form){
		var strs=form.tel.value;
		if( !isAllNumber(strs)){
			form.tel.value="";
			alert("请输入正确的数据--数字!");
		}      
	}
    function onPage(form){
		var strs=form.pagesize.value;
		if( !isAllNumber(strs)){
			form.pagesize.value="";
			alert("请输入正确的数据--数字!");
		}      
		if(form.pagesize.value>30){
			form.pagesize.value=10;
			alert("您输入的数字也太大了!");
		}	
	}
    function onMobile(form){
		var strs=form.mobile.value;
		if( !isAllNumber(strs)){
			form.mobile.value="";
			alert("请输入正确的数据--数字!");
		}      
	}
//金喜善
	function isAllNumber(str){
		var test = true;
		for(var j=0;j<str.length;j++){
			if(str.substring(j,j+1) != "0"&&
				str.substring(j,j+1) != "1"&&
				str.substring(j,j+1) != "2"&&
				str.substring(j,j+1) != "3"&&
				str.substring(j,j+1) != "4"&&
				str.substring(j,j+1) != "5"&&
				str.substring(j,j+1) != "6"&&
				str.substring(j,j+1) != "7"&&  
				str.substring(j,j+1) != "8"&&
				str.substring(j,j+1) != "9")
				test=false;
		}  
		return test;
	}
	
	if (window.Event) 
document.captureEvents(Event.MOUSEUP); 

function nocontextmenu() 
{
event.cancelBubble = true
event.returnValue = false;

return false;
}

function norightclick(e) 
{
if (window.Event) 
{
if (e.which == 2 || e.which == 3)
return false;
}
else
if (event.button == 2 || event.button == 3)
{
event.cancelBubble = true
event.returnValue = false;
return false;
}

}

document.oncontextmenu = nocontextmenu; // for IE5+
document.onmousedown = norightclick; // for all others

</script>

<link rel="stylesheet" href="oa.css">
</head>

<body leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">
<form method="post" action="userlog.jsp" name="myform" onsubmit="return  validate()"> 
<table width="100%" border="0" cellspacing="1" cellpadding="2"> 
<tr >
	<td class="heading" align="center">
	<table width="81%" border="0" cellspacing="0" cellpadding="0" bgcolor="#000000" bordercolorlight="#000000"> 
		<tr>
			<td width="2%" align="right"></td>
			<td align="left" height="25" > <p align="center"><font color="#FFFFFF"><b>申 请 帐 号</b></font></p></td>
			<td width="3%"></td>
		</tr>
	</table>
	</td>
</tr> 
</table><div align="center"> 
<table WIDTH="80%" BORDER="1" CELLSPACING="0" CELLPADDING="0" BORDERCOLORDARK="#FFFFFF" BORDERCOLOR="#FFFFFF" BORDERCOLORLIGHT="#000000"> 
	<tr>
		<td WIDTH="17%" VALIGN="top"><p ALIGN="right">你的姓名:</p></td>
		<td WIDTH="83%"><input TYPE="text" NAME="name" CLASS="form" SIZE="24"> </td>
	</tr> 
	<tr>
		<td WIDTH="17%" VALIGN="top" HEIGHT="6"><p ALIGN="right">登录帐号:</p></td>
		<td WIDTH="83%" HEIGHT="6"> 
			<input TYPE="text" NAME="username" CLASS="form" SIZE="24"><br>(<FONT COLOR="#FF0000">请用您的实名进行注册,否则不予以审核</FONT>)
		</td>
	</tr> 
	<tr>
		<td WIDTH="17%"  VALIGN="top" HEIGHT="16"><p ALIGN="right">登录密码:</p></td>
		<td WIDTH="83%" HEIGHT="16"> 
			<input TYPE="password" NAME="password" CLASS="form" SIZE="24"> 
		</td>
	</tr>
	<tr> 
		<td WIDTH="17%"  VALIGN="top" HEIGHT="16"><p ALIGN="right">密码问题:</p></td>
		<td WIDTH="83%" HEIGHT="16">
			<input TYPE="text" NAME="question" CLASS="form" SIZE="24">
		</td>
	</tr>
	<tr>
		<td WIDTH="17%"  VALIGN="top" HEIGHT="16"><p ALIGN="right">密码答案:</p></td>
		<td WIDTH="83%" HEIGHT="16">
			<input TYPE="text" NAME="answer" CLASS="form" SIZE="24"> 
		</td>
	</tr>
	<tr>
		<td WIDTH="17%"  VALIGN="top"><p ALIGN="right">单位名称: </td>
		<td WIDTH="83%"><select name="company"> 
		<%
		if(! sqlbean.next()){
			out.println("<font color='red'>还没有输入部门数据</font>");
		}else{
			do{
				out.println("<option VALUE=\""+sqlbean.getString("type")+"\">"+sqlbean.getString("type")+"</option>");
			} while(sqlbean.next());
		}
		sqlbean.close();
		%> 
		</select></td>
	</tr>
	<tr> 
		<td WIDTH="17%"  VALIGN="top"><p ALIGN="right">手机号码:</p></td>
		<td WIDTH="83%"><input TYPE="text" NAME="mobile" CLASS="form" SIZE="24" onchange="onMobile(this.form)"></td>
	</tr>
	<tr>
		<td WIDTH="17%"  VALIGN="top" HEIGHT="27"><p ALIGN="right">电话号码:</p></td>
		<td WIDTH="83%" HEIGHT="27"><input TYPE="text" NAME="tel" CLASS="form" SIZE="24" onchange="onTel(this.form)"></td>
	</tr>
	<tr>
		<td WIDTH="17%"  VALIGN="top"> <p ALIGN="right">电子邮件:</p></td>
		<td WIDTH="83%"><input TYPE="text" NAME="email" CLASS="form" SIZE="24"></td>
	</tr> 	
	<tr>
		<td WIDTH="17%"  VALIGN="top"> <p ALIGN="right">页面大小:</p></td>
		<td WIDTH="83%"><input TYPE="text" NAME="pagesize" CLASS="form" SIZE="24" onchange="onPage(this.form)" value=10></td>
	</tr> 	
</table></div><div align="center">
	<input type=image  src="images/add_off.gif">&nbsp;&nbsp;
	<a href="javaScript:window.close()"><img   border="0" src="images/close_1.gif"></a> 
	</div>
</form><div align="center"> 
<table border="1" width="80%" bordercolorlight="#000000" bordercolordark="#FFFFFF" bgcolor="#FFFFFF" bordercolor="#C0C0C0" HEIGHT="102"> 
	<tr>
		<td width="100%" HEIGHT="101"> 系统提醒您: 
		<ul>
		<li>你的姓名(<font color="#FF0000">必填</font>);&nbsp;</li>
		<li>登录帐号(<font color="#FF0000">必填</font>);&nbsp;</li>
		<li>登录密码:(<font color="#FF0000">必填</font>)</li>
		<li>公司名称(<font color="#FF0000">必填</font>)</li>
		<li>手机号码</li><li>电子邮件</li></ul>
		</td>
	</tr> 
</table></div>
       
</body>       
</html>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -