Skip to content

Commit

Permalink
hzuapps#2 hzuapps#3 提交实验代码
Browse files Browse the repository at this point in the history
  • Loading branch information
chenshun2016 committed Oct 27, 2016
1 parent 02f1a7a commit f4b06e9
Show file tree
Hide file tree
Showing 4 changed files with 77 additions and 0 deletions.
29 changes: 29 additions & 0 deletions labs/1414080902214/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="description" content="">
<meta name="author" content="">
<link rel="icon" href="../../favicon.ico">

<title>邮箱登录</title>

</head>

<body>

<div class="container">

<form action="" method="post" id="target">
姓名:<input name="rdName"><br>
电话:<input name="phName"><br>
地址:<input name="phName"><br>
<input type="submit" value="提交">
</form>
</div> <!-- /container -->


<script src="./index.js"></script>
</body>
</html>
10 changes: 10 additions & 0 deletions labs/1414080902214/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
$( "#target" ).submit(function( event ) {
$.ajax({
url: "success.json"
}).done(function(data) {
if ( console && console.log ) {
console.dir(data);
alert(data.msg);
}
});
});
37 changes: 37 additions & 0 deletions labs/1414080902214/index.jsp
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="description" content="">
<meta name="author" content="">
<link rel="icon" href="../../favicon.ico">

<title>邮箱登录</title>

</head>

<body>

<div class="container">

<form action="" method="post" id="target">
姓名:<input name="rdName"><br>
电话:<input name="phName"><br>
地址:<input name="phName"><br>
<input type="submit" value="提交">
</form>
</div>
<hr>
<p>程序运行时间:<%=new Date() %></p>

<script src="./index.js"></script>
</body>
</html>
1 change: 1 addition & 0 deletions labs/1414080902214/success.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"msg":"提交成功"}

0 comments on commit f4b06e9

Please sign in to comment.