61,112
社区成员
发帖
与我相关
我的任务
分享
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<!-- saved from url=(0013)about:internet-->
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>登陆</title>
</head>
<script language="javascript">
function check()
{
if((username.value=="zhangsan") &&(userpsd.value=="123"))
location.href="logok.html";
else
window.alert("错误");
}
</script>
<body>
<table border="0" align="center">
<tr>
<td colspan="2" align="center">用户登陆</td>
</tr>
<tr>
<td>用户名:</td>
<td><input name="username" type="text" id="username"/></td>
</tr>
<tr>
<td>密码:</td>
<td><input name="userpsd" type="password" id="userpsd" /></td>
</tr>
<tr>
<td colspan="2" align="center"><input type="submit" value="登陆" onClick="check();"/> </td>
</tr>
</table>
</body>
</html>