有知道的告诉我一声,将不胜感激,非常紧!在线等!!
是同一个表单呀? 怎么用JS呢?? 这是代码,帮我改改呀! <HTML> <HEAD> <TITLE></TITLE> <META http-equiv=Content-Type content="text/html; charset=gb2312"> </HEAD> <BODY leftMargin=0 topMargin=0>
<script language=javascript> function voidNum(argValue) { var flag1=false; var compStr="1234567890abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ_-"; var length2=argValue.length; for (var iIndex=0;iIndex<length2;iIndex++) { var temp1=compStr.indexOf(argValue.charAt(iIndex)); if(temp1==-1) { flag1=false; break; } else {flag1=true;} } return flag1; } </script> <script language=javascript> function check() { var check; if (!voidNum(document.login.LoginName.value)) { alert("请正确输入管理员账号。"); document.login.LoginName.focus(); return false; exit; } if (!voidNum(document.login.Password.value)) { alert("请正确输入管理员密码。"); document.login.Password.focus(); return false; exit; } return true; } </script> <br> <br>
<br> <table width="460" height="260" border="0" align="center" cellpadding="1" cellspacing="1" bgcolor="#999999"> <tr> <td colspan="2" align="center" valign="top" bgcolor="#FFFFFF"><table width="100%" border="0" cellpadding="0" cellspacing="0" bgcolor="#CCCCCC"> <tr align="center" bgcolor="#7D7AB6" > <td height="24" colspan="2" style='BORDER-BOTTOM:#666666 1px solid;'> </td> </tr> <tr bgcolor="#E9E8F3"> <td width="56%" height="56" valign="bottom" bgcolor="#E9E8F3"> </td> <td width="44%" align="right" valign="bottom" bgcolor="#E9E8F3"></td> </tr> <tr valign="top" bgcolor="#BDBCDA"> <td height="176" colspan="2"><table class=font9 cellspacing=2 cellpadding=0 width=220 align=center border=0> <form action="CHKLOGIN.ASP" method="post" name="login" id="login" onSubmit="return check()"> <tr> <td height=25> </td> <td> </td> </tr> <tr> <td width=58 height=25>用户名:</td> <td width=156><input name="LoginName" class="myput" size=22> </td> </tr> <tr> <td width=58 height=25>密 码:</td> <td width=156><input name="Password" type=password class="myput" size=22> </td> </tr> <tr valign="top"> <td height="36" align="center" valign="middle">验证码:</td> <td height="36" valign="middle"><input name=yzm id=yzm onKeyDown="onlyNum();" size=4 class="myput" maxlength=4> <!--#include file="..\yzm\Function.asp" --><%Call GetSafeCode%> </td> </tr> <tr align="center" valign="bottom"> <td height=30 colspan=2><input type="submit" name="Submit" value=" 英文界面 " > <input type="submit" name="Submit" value=" 中文界面 "> </td> </tr> </form> </table></td> </tr> </table></td> </tr> </table> </BODY> </HTML>