<!DOCTYPE HTML>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
</head>
<body>
<script type="text/javascript">
function check(){
if(username.value=="ym")&&(password.value=="123")
{alert("登录成功")} else{alert("用户名或密码错误")}
}
</script>
<div id="name">用户名<td><input type="text" name="username" id="username" value=""></td>
</div>
<div id="password1">密码<td><input type="text" name="password" value=""></td>
</div>
<div id="submit1"><input type="submit" id="password" value="登录" onclick="check()"></div>
</body>
</html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
</head>
<body>
<script type="text/javascript">
function check(){
if(username.value=="ym")&&(password.value=="123")
{alert("登录成功")} else{alert("用户名或密码错误")}
}
</script>
<div id="name">用户名<td><input type="text" name="username" id="username" value=""></td>
</div>
<div id="password1">密码<td><input type="text" name="password" value=""></td>
</div>
<div id="submit1"><input type="submit" id="password" value="登录" onclick="check()"></div>
</body>
</html>
