62,025
社区成员
发帖
与我相关
我的任务
分享
<input id="validateNum" tabindex="3" class="regtxt" title="请填写验证码" maxlength="6" size="6" />
.regtxt
{
border-right: #6c9e47 1px solid;
border-top: #6c9e47 1px solid;
border-left: #6c9e47 1px solid;
width: 170px;
border-bottom: #6c9e47 1px solid;
height: 21px;
font-size: 18.5px;
}
.regtxt3 {
BORDER-RIGHT: #6c9e47 1px solid; BORDER-TOP: #6c9e47 1px solid; BORDER-LEFT: #6c9e47 1px solid; WIDTH: 100px; BORDER-BOTTOM: #6c9e47 1px solid; height: 21px; font-size: 18.5px;
}
//管理员登录页面提交表单前的验证
function GetActionUrl()
{
var loginName = document.getElementById('loginName').value;
var tmpLoginName = Trim(loginName);
if (tmpLoginName == "")
{
alert("登录名不能为空!");
document.getElementById('loginName').value = "";
document.getElementById('loginName').focus();
return false;
}
var password = document.getElementById('password').value;
var tmpPassword = Trim(password);
if (tmpPassword == "")
{
alert("密码不能为空!");
document.getElementById('password').value = "";
document.getElementById('password').focus();
return false;
}
var validateNum = document.getElementById('validateNum').value;
var tmpValidateNum = Trim(validateNum);
if (tmpValidateNum == "")
{
alert("验证码不能为空!");
document.getElementById('validateNum').value = "";
document.getElementById('validateNum').focus();
return false;
}
var actionUrl = "Login.aspx?loginName=";
actionUrl += tmpLoginName;
actionUrl += "&password=";
actionUrl += tmpPassword;
actionUrl += "&validateNum=";
actionUrl += tmpValidateNum;
document.forms[0].action = actionUrl;
return true;
}
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>管理员登陆</title>
<meta http-equiv="Content-Language" content="zh-cn" />
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<meta content="MSHTML 6.00.2800.1611" name="GENERATOR" />
<link href="../CSS/body.css" type="text/css" rel="stylesheet" />
<link href="../CSS/newhead.css" type="text/css" rel="stylesheet" />
</head>
<body scroll="no" style="background-color: #eef8e0; left: 0; top: 0; width: 0; height: 0;"
onload="document.forms[0].loginName.select();">
<script src="../JS/js_common.js" type="text/javascript"></script>
<form id="adminLogin" action="" method="post" onsubmit="return GetActionUrl();">
<table cellspacing="0" cellpadding="0" width="1004" border="0">
<tbody>
<tr>
<td colspan="6">
<img height="92" alt="" src="../images/crm_1.gif" width="345" /></td>
<td colspan="4">
<img height="92" alt="" src="../images/crm_2.gif" width="452" /></td>
<td>
<img height="92" alt="" src="../images/crm_3.gif" width="207" /></td>
</tr>
<tr>
<td colspan="6">
<img height="98" alt="" src="../images/crm_4.gif" width="345" /></td>
<td colspan="4">
<img height="98" alt="" src="../images/crm_5.gif" width="452" /></td>
<td>
<img height="98" alt="" src="../images/crm_6.gif" width="207" /></td>
</tr>
<tr>
<td rowspan="5">
<img height="370" alt="" src="../images/crm_7.gif" width="59" /></td>
<td colspan="5">
<img height="80" alt="" src="../images/crm_8.gif" width="286" /></td>
<td colspan="4">
<img height="80" alt="" src="../images/crm_9.gif" width="452" /></td>
<td>
<img height="80" alt="" src="../images/crm_10.gif" width="207" /></td>
</tr>
<tr>
<td>
<img height="110" alt="" src="../images/crm_11.gif" width="127" /></td>
<td style="background-image: url(../images/crm_12.gif)" colspan="6">
<table id="table1" cellspacing="0" cellpadding="0" width="98%" border="0">
<tbody>
<tr>
<td>
<table id="table2" cellspacing="1" cellpadding="0" width="100%" border="0">
<tbody>
<tr>
<td align="center" width="81">
<font color="#ffffff">用户名:</font></td>
<td>
<input id="loginName" tabindex="1" class="regtxt" title="请填写用户名" maxlength="16" size="16" /></td>
</tr>
<tr>
<td align="center" width="81">
<font color="#ffffff">密 码:</font></td>
<td>
<input id="password" tabindex="2" class="regtxt" title="请填写密码" type="password" maxlength="16"
size="16" /></td>
</tr>
<tr>
<td align="center" width="81">
<font color="#ffffff">验证码:</font></td>
<td>
<div style="width: 26px; height: 4px; float: left;">
<input id="validateNum" tabindex="3" class="regtxt" title="请填写验证码" maxlength="6" size="6" />
</div>
<div style="width: 32px; height: 4px; float: right;">
<img alt="" id='RandomNumberId' src="RandomNumber.aspx" style="width: 44px; height: 21px;
float: left;" /></div>
</td>
<td style="width: 100px; height: 16px;">
<div style="width: 63px; height: 16px">
<a href="#" onclick="document.getElementById('RandomNumberId').src='RandomNumber.aspx'; return false">
<span style="color: #0000ff">看不清?</span></a></div>
</td>
</tr>
</tbody>
</table>
</td>
</tr>
</tbody>
</table>
</td>
<td colspan="2" rowspan="2">
<img height="158" alt="" src="../images/crm_13.gif" width="295" /></td>
<td rowspan="2">
<img height="158" alt="" src="../images/crm_14.gif" width="207" /></td>
</tr>
<tr>
<td rowspan="3">
<img height="180" alt="" src="../images/crm_15.gif" width="127" /></td>
<td rowspan="3">
<img height="180" alt="" src="../images/crm_16.gif" width="24" /></td>
<td>
<input title="登录后台" type="image" tabindex="4" style="height: 48; width: 86;" src="../images/crm_17.gif" /></td>
<td>
<img height="48" alt="" src="../images/crm_18.gif" width="21" /></td>
<td colspan="2">
<a tabindex="5" href="../Default.aspx">
<img title="返回首页" height="48" alt="" src="../images/crm_19.gif" width="84" border="0" /></a></td>
<td>
<img height="48" alt="" src="../images/crm_20.gif" width="101" /></td>
</tr>
<tr>
<td colspan="5" rowspan="2">
<img height="132" alt="" src="../images/crm_21.gif" width="292" /></td>
<td rowspan="2">
<img height="132" alt="" src="../images/crm_22.gif" width="170" /></td>
<td colspan="2">
<img height="75" alt="" src="../images/crm_23.gif" width="332" /></td>
</tr>
<tr>
<td colspan="2">
<img height="57" alt="" src="../images/crm_24.gif" width="332" /></td>
</tr>
<tr>
<td>
<img height="1" alt="" src="../images/spacer.gif" width="59" /></td>
<td>
<img height="1" alt="" src="../images/spacer.gif" width="127" /></td>
<td>
<img height="1" alt="" src="../images/spacer.gif" width="24" /></td>
<td>
<img height="1" alt="" src="../images/spacer.gif" width="86" /></td>
<td>
<img height="1" alt="" src="../images/spacer.gif" width="21" /></td>
<td>
<img height="1" alt="" src="../images/spacer.gif" width="28" /></td>
<td>
<img height="1" alt="" src="../images/spacer.gif" width="56" /></td>
<td>
<img height="1" alt="" src="../images/spacer.gif" width="101" /></td>
<td>
<img height="1" alt="" src="../images/spacer.gif" width="170" /></td>
<td>
<img height="1" alt="" src="../images/spacer.gif" width="125" /></td>
<td>
<img height="1" alt="" src="../images/spacer.gif" width="207" /></td>
</tr>
</tbody>
</table>
</form>
</body>
</html>
<form id="adminLogin" action="" method="post" onsubmit="return GetActionUrl();">
...
<input id="loginName" tabindex="1" class="regtxt" title="请填写用户名" maxlength="16" size="16" />
<input id="password" tabindex="2" class="regtxt" title="请填写密码" type="password" maxlength="16" size="16" />
<input id="validateNum" tabindex="3" class="regtxt3" title="请填写验证码" maxlength="6" size="6" />
//管理员登录页面提交表单前的验证
function GetActionUrl()
{
var loginName = document.getElementById('loginName').value;
var tmpLoginName = Trim(loginName);
if (tmpLoginName == "")
{
alert("登录名不能为空!");
document.getElementById('loginName').value = "";
document.getElementById('loginName').focus();
return false;
}
var password = document.getElementById('password').value;
var tmpPassword = Trim(password);
if (tmpPassword == "")
{
alert("密码不能为空!");
document.getElementById('password').value = "";
document.getElementById('password').focus();
return false;
}
var validateNum = document.getElementById('validateNum').value;
var tmpValidateNum = Trim(validateNum);
if (tmpValidateNum == "")
{
alert("验证码不能为空!");
document.getElementById('validateNum').value = "";
document.getElementById('validateNum').focus();
return false;
}
var actionUrl = "Login.aspx?loginName=";
actionUrl += tmpLoginName;
actionUrl += "&password=";
actionUrl += tmpPassword;
actionUrl += "&validateNum=";
actionUrl += tmpValidateNum;
document.forms[0].action = actionUrl;
return true;
}