知道用户名和密码怎样用一个超连接来跳过这个登录界面直接进入系统呢?不能改登录界面的代码。
SBCDJ 2006-11-07 09:40:45 已知username=888888 password=888888
登录界面代码如下:
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>----------</title>
<script language="JavaScript" type="text/JavaScript">
<!--
function MM_reloadPage(init) {
if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}
else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();
}
MM_reloadPage(true);
var temp = location.host;
var hostaddr = temp.indexOf(":");
if (hostaddr != -1)
{
hostaddr = temp.substring(0, hostaddr);
// alert("when hostaddr != -1, the host value is "+hostaddr);
}
else
hostaddr = temp;
// alert("when hostaddr == -1, the host value is "+hostaddr);
function setCookie() {
now=new Date();
now.setTime(now.getTime() + 1000 * 60 * 30);
nameValue=escape(document.all.username.value + "#N1"
+ document.all.password.value +"#N2"
+hostaddr + "#N3"
+ "xxxxxxxxx");
document.cookie="ID="+nameValue+";expires="+now.toGMTString();
}
function checkit(i)
{
str_name = document.all.username.value;
str_pwd = document.all.password.value;
if (str_name.length == 0)
{
if (i != 1)
{
alert('用户名不能为空!');
return false;
}
else
{
alert('The Account can NOT be empty!');
return false;
}
}
else if(str_pwd.length == 0)
{
if (i != 1)
{
alert("密码不能为空!");
return false;
}
else
{
alert('The Password can NOT be empty!');
return false;
}
}
else
{
if (i != 1)
{
document.cnsmt.cnname.value = document.all.username.value;
document.cnsmt.cnpwd.value = document.all.password.value;
return true;
}
else
{
document.ensmit.cnname.value = document.all.username.value;
document.ensmit.cnpwd.value = document.all.password.value;
return true;
}
}
}
-->
</SCRIPT>
</head>
<body bgcolor="#636066">
<div id="Layer1" style="position:absolute; left:320px; top:230px; width:380px; height:200px; z-index:1">
<form name = "cnsmt" action="webs/loginHandle" method="post">
<input type="hidden" name="cnname" value="888888">
<input type="hidden" name="cnpwd" value="888888">
</form>
<table width="380" height="200" border="0" cellpadding="0" cellspacing="0" background="img/log_bg.jpg">
<tr>
<td width="70" height="80"> </td>
<td colspan="3"> </td>
</tr>
<tr>
<td rowspan="2"> </td>
<td height="24">用户名称:</td>
<td colspan="2"><input type="text" id="username" name="username" style="font-family: Arial;"></td>
</tr>
<tr>
<td height="24">密码:</td>
<td colspan="2"><input type="password" id="password" name="password" style="font-family: Arial;"></td>
</tr>
<tr>
<td> </td>
<td> </td>
<td width="90"> </td>
<td style="vertical-align: middle;"><input type="image" src="img/loginbt.gif" onclick="if(checkit(0)) {setCookie(); document.cnsmt.submit();} else {return false;}"></td>
</tr>
</table>
</div>
</body>
</html>