orderlogin.jsp
上传用户:xjrzjk
上传日期:2022-07-31
资源大小:1585k
文件大小:4k
- <%@ page contentType="text/html; charset=GBK" %>
- <%
- try{
- %>
- <html>
- <head>
- <title>
- 会员登录
- </title>
- <link rel="stylesheet" type="text/css" href="style.css">
- <SCRIPT language=javascript id=clientEventHandlersJS>
- //函数名:chksafe
- //功能介绍:检查是否含有"'",'\',"/"
- //参数说明:要检查的字符串
- //返回值:0:是 1:不是
- function chksafe(a)
- {
- return 1;
- /* fibdn = new Array ("'" ,"\", "、", ",", ";", "/");
- i=fibdn.length;
- j=a.length;
- for (ii=0;ii<i;ii++)
- { for (jj=0;jj<j;jj++)
- { temp1=a.charAt(jj);
- temp2=fibdn[ii];
- if (tem';p1==temp2)
- { return 0; }
- }
- }
- return 1;
- */
- }
- //函数名:chkspc
- //功能介绍:检查是否含有空格
- //参数说明:要检查的字符串
- //返回值:0:是 1:不是
- function chkspc(a)
- {
- var i=a.length;
- var j = 0;
- var k = 0;
- while (k<i)
- {
- if (a.charAt(k) != " ")
- j = j+1;
- k = k+1;
- }
- if (j==0)
- {
- return 0;
- }
- if (i!=j)
- { return 2; }
- else
- {
- return 1;
- }
- }
- //函数名:fucCheckLength
- //功能介绍:检查字符串的长度
- //参数说明:要检查的字符串
- //返回值:长度值
- function fucCheckLength(strTemp)
- {
- var i,sum;
- sum=0;
- for(i=0;i<strTemp.length;i++)
- {
- if ((strTemp.charCodeAt(i)>=0) && (strTemp.charCodeAt(i)<=255))
- sum=sum+1;
- else
- sum=sum+2;
- }
- return sum;
- }
- </SCRIPT>
- <SCRIPT language=javascript>
- function chkitem(str)
- {
- var strSource ="0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ_";
- var ch;
- var i;
- var temp;
- for (i=0;i<=(str.length-1);i++)
- {
- ch = str.charAt(i);
- temp = strSource.indexOf(ch);
- if (temp==-1)
- {
- return 0;
- }
- }
- if (strSource.indexOf(ch)==-1)
- {
- return 0;
- }
- else
- {
- return 1;
- }
- }
- function FORM1_onsubmit()
- {
- if (chkitem(document.FORM1.uid.value)==0)
- {
- alert("请输入正确的会员帐号。");
- document.FORM1.uid.focus();
- return false;
- }
- if ((document.FORM1.uid.vlaue=='') || (chkspc(document.FORM1.uid.value)==0)|| (chkspc(document.FORM1.uid.value)==2))
- {
- alert("请将会员帐号填写完整,且不能使用空格!");
- document.FORM1.uid.focus();
- return false;
- }
- if (chkitem(document.FORM1.pwd.value)==0)
- {
- alert("请将填写密码!");
- document.FORM1.pwd.focus();
- return false;
- }
- if ( fucCheckLength(document.FORM1.uid.value) != document.FORM1.uid.value.length )
- {
- alert("会员帐号请不要使用中文!");
- document.FORM1.uid.focus();
- return false;
- }
- if (fucCheckLength(document.FORM1.uid.value) <4 )
- {
- alert("会员帐号必须至少4位");
- document.FORM1.uid.focus();
- return false;
- }
- }
- </SCRIPT>
- </head>
- <body bgcolor="#ffffff">
- <BR><BR>
- <FORM language=javascript name=FORM1 onsubmit="return FORM1_onsubmit()" action="orderloginsb.jsp" method=post>
- <div align="center">
- <center>
- <TABLE cellSpacing=0 cellPadding=0 width=300>
- <TBODY>
- <TR>
- <TD align=middle width="298">
- <TABLE cellSpacing=1 cellPadding=4 width=271 bgColor=#416327>
- <TBODY>
- <TR vAlign=top bgColor=#eeeeee>
- <TD colSpan=2 width="257">会员登录--</TD></TR>
- <TR bgColor=#eeeeee>
- <TD width=79 bgColor=#006699 height=7><SPAN
- ><font color="#FFFFFF">会员帐号:</font></SPAN></TD>
- <TD width=166 height=7 bgcolor="#eeeeee"><font color="#FFFFFF"><INPUT maxLength=16 size=13
- name=uid> </font> </TD></TR>
- <tr>
- <TD width=79 bgColor=#006699 height=7><SPAN
- ><font color="#FFFFFF">会员密码:</font></SPAN></TD>
- <TD width=166 height=7 bgcolor="#eeeeee"><font color="#FFFFFF"><INPUT maxLength=16 size=13
- name=pwd type="password"> </font> </TD>
- </tr>
- <TR vAlign=top bgColor=#eeeeee>
- <TD colSpan=2 width="257"></TD></TR>
- <TR bgColor=#eeeeee>
- <TD colSpan=2 width="257">
- <DIV align=center><INPUT type=submit size=3 value=立刻登录 name=Submit2>
- <input type="button" value="注册" name="B1" onclick="window.location.href='Reg_User.htm';">
- </DIV></TD></TR></TBODY></TABLE>
- </TD></TR></TBODY></TABLE></center>
- </div>
- <BR></FORM>
- </body>
- </html>
- <%
- }catch(Exception e){
- throw (e);
- }
- %>