ment.jsp
上传用户:xjrzjk
上传日期:2022-07-31
资源大小:1585k
文件大小:6k
- <%@ page contentType="text/html; charset=GBK" %>
- <%
- try{
- String strProductList = (String)request.getSession(true).getAttribute("productList");
- String strJs = "";
- if (strProductList == null || strProductList.equals("")){
- strJs = "alert('您没有选购商品,不能够结帐!');";
- strJs += "window.close();";
- }
- String strLoginSuccess = (String)request.getSession(true).getAttribute("LoginSuccess");
- if (strLoginSuccess == null || strLoginSuccess.equals("")){
- %>
- <jsp:forward page="ment1.jsp" />
- <%
- }
- %>
- <html>
- <head>
- <title>
- 会员登录
- </title>
- <link rel="stylesheet" type="text/css" href="style.css">
- <script language="javascript">
- <!--
- <%=strJs%>
- //-->
- </script>
- <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()
- {
- alert(document.form1.action);
- 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>
- <div align="center">
- <center>
- <TABLE cellSpacing=0 cellPadding=0 width=261>
- <TBODY>
- <TR>
- <TD height=62 width="259">
-
- <p align="center"><font color="#FF0000">本站会员购物结算入口
- <BR>
- </font></p>
- <FORM language=javascript name=FORM1 onsubmit="return FORM1_onsubmit()" action="mentlogin.jsp" method=post>
- <TABLE cellSpacing=0 cellPadding=0 width=230>
- <TBODY>
- <TR>
- <TD align=middle><STRONG><FONT color=red>
- </FONT></STRONG>
- <TABLE cellSpacing=1 width=230 bgColor=#000000>
- <TBODY>
- <TR vAlign=top bgColor=#eeeeee>
- <TD colSpan=2 width="216" bgcolor="#006699">
- <p align="center"><font color="#FFFFFF">会员登录</font></p>
- </TD></TR>
- <TR bgColor=#eeeeee>
- <TD width=84 bgcolor=#006699 height=7><SPAN
- ><font color="#FFFFFF">会员帐号:</font></SPAN></TD>
- <TD width=120 height=7 bgcolor="#0099CC"><font color="#FFFFFF"><INPUT maxLength=16 size=13
- name=uid> </font> </TD></TR>
- <tr>
- <TD width=84 bgcolor=#006699 height=7><SPAN
- ><font color="#FFFFFF">会员密码:</font></SPAN></TD>
- <TD width=120 height=7 bgcolor="#0099CC"><font color="#FFFFFF"><INPUT maxLength=16 size=13
- name=pwd type="password"> </font> </TD>
- </tr>
- <TR vAlign=top bgColor=#eeeeee>
- <TD colSpan=2 width="216" bgcolor="#006699"></TD></TR>
- <TR bgColor=#eeeeee>
- <TD colSpan=2 width="216" bgcolor="#006699">
- <DIV align=center><INPUT class=main type=submit size=3 value=立刻登录 name=Submit2>
- <input type="button" value="注册会员" name="B1" onclick="window.location.href='reguser.htm';">
- </DIV></TD></TR></TBODY></TABLE>
- </TD></TR></TBODY></TABLE><BR></FORM></TD></TR></TBODY></TABLE>
- </center>
- </div>
- <div align="center">
- <center>
- <table border="0" width="500" cellspacing="0" cellpadding="0">
- <tr>
- <td width="100%" style="text-indent: 20; line-height: 100%; margin-left: 20; margin-right: 20">购买须知道:
- <p>1、如果你已经是我们的会员,那么,请把你的“注册帐号”和“会员密码”填在里面,再“离开登录”,我们就可以收到你的订单了。</p>
- <p>2、你如果还不是本站的会员,那么,请你先返回首页,点击“注册会员”进行注册,这样你才可以买到我们的优惠价。</p>
- <p> </td>
- </tr>
- </table>
- </center>
- </div>
- </BODY>
- </html>
- <%
- }catch(Exception e){
- throw (e);
- }
- %>