怎么用javascri语言t登陆窗口输入账号密码后怎么调到主界面去
<script type="text/javascript" language="javascript">
function Tj()
{
var txtName = document.getElementById("Name").value;
var txtPwd = document.getElementById("Pwd").value;
if( txtName=="admin"&&txtPwd=="admin")
{
window.open="二手网 - 副本 - 副本.html";
return true;
}
else
{
alert("用户名/密码错误");
return false;
}
}
</script>
<body bgcolor="#CCCCCC" >
<div id="btn">
<div id="main">
<div id="top">
<img src="Image/会员登录.gif" />
</div>
<div id="buttom">
<div id="left"></div>
<div id="right">
<form name="form1" onsubmit="return Tj()">
<table>
<tr>
<th width="65" height="35">用户名:</th>
<td width="219"><input type="text" id="Name" /></td>
</tr>
<tr>
<th height="36">密码:</th>
<td><input type="password" id="Pwd" /></td>
</tr>
<tr>
<td height="36"> </td>
<td><input type="checkbox" id="chk"/> 下次自动登录</td>
</tr>
<tr>
<td> </td>
<td><input type="submit" value="登录" onclick="Tj()" />
<span style="padding-left:2px;"><a href="">免费注册</a></span> <span style="padding-left:2px;"><a href="">找回密码</a></span>
</td>
</tr>
</table>
</form>
</div>
</div>
</div>
</div>
</body>
------解决方案--------------------将值发到后台后存到session里跳到主界面后取session值试试
不明白你的意思
------解决方案--------------------window.location.href='地址'