87,984
社区成员
发帖
与我相关
我的任务
分享
<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>登录页面</title>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
</head>
<%@include file="./common.jsp"%>
<script type="text/javascript">
$(function(){
$("#submit").on("click",function(){
var loginName = $("#loginName").val();
var loginPassword = $("#loginPassword").val();
if(loginName=="admin"&&loginPassword=="123456"){
window.location.href = "/index.jsp";
}else{
alert("输入用户名称和密码!");
}
});
});
</script>
<body id="login">
<div >
<form>
<div class="form-group">
<label >用户名</label>
<input class="form-control" type="text" id="loginName"/>
</div>
<div class="form-group">
<label>密码</label>
<input class="form-control" type="password" id="loginPassword" />
<button id="submit">登录</button>
</div>
</form>
</div>
</body>