Skip to content

Commit

Permalink
#2提交实验代码
Browse files Browse the repository at this point in the history
  • Loading branch information
firesWu committed Nov 24, 2016
1 parent 5111abb commit cfd4f03
Showing 1 changed file with 82 additions and 0 deletions.
82 changes: 82 additions & 0 deletions labs/1414080902229/index.jsp
Original file line number Diff line number Diff line change
@@ -0,0 +1,82 @@
<%@ page language="java" import="java.util.*" pageEncoding="ISO-8859-1"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<base href="<%=basePath%>">

<title>My JSP 'index.jsp' starting page</title>
<meta http-equiv="pragma" content="no-cache">
<meta http-equiv="cache-control" content="no-cache">
<meta http-equiv="expires" content="0">
<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
<meta http-equiv="description" content="This is my page">
<!--
<link rel="stylesheet" type="text/css" href="styles.css">
-->

<!-- 新 Bootstrap 核心 CSS 文件 -->
<link rel="stylesheet" href="http://cdn.bootcss.com/bootstrap/3.3.0/css/bootstrap.min.css">

<!-- 可选的Bootstrap主题文件(一般不用引入) -->
<link rel="stylesheet" href="http://cdn.bootcss.com/bootstrap/3.3.0/css/bootstrap-theme.min.css">

<!-- jQuery文件。务必在bootstrap.min.js 之前引入 -->
<script src="http://cdn.bootcss.com/jquery/1.11.1/jquery.min.js"></script>

<!-- 最新的 Bootstrap 核心 JavaScript 文件 -->
<script src="http://cdn.bootcss.com/bootstrap/3.3.0/js/bootstrap.min.js"></script>

<script>
function submitClick(){
var xuehao =$("#xuehao").val();
var password =$("#password").val()
if(xuehao==null||xuehao==undefined||xuehao==''){
alert("account is't null");
return ;
}
if(password==null||password==undefined||password==''){
alert("password is't null");
return ;
}
$.getJSON('success.json', function(data){
alert(data.msg);
$("#myModal").hide();
});
}
</script>
</head>

<body>

<button type="button" class="btn btn-primary btn-lg" data-toggle="modal" data-target="#myModal">
login in
</button>

<!-- Modal -->
<div class="modal fade" id="myModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">&times;</span><span class="sr-only">Close</span></button>
<h4 class="modal-title" id="myModalLabel">Modal title</h4>
</div>
<div class="modal-body">
account:<input type="text" id="xuehao" name="xuehao" />
password:<input type="password" id="password" name=""password"" />
</div>
<div class="modal-footer">
<button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
<button type="button" id="submit1" onclick="submitClick()" class="btn btn-primary">login</button>
</div>
</div>
</div>
</div>
</body>
</html>

0 comments on commit cfd4f03

Please sign in to comment.