Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

#2 提交实验代码 #14

Merged
merged 1 commit into from
Oct 2, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
45 changes: 45 additions & 0 deletions labs/1414080902124/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
<html>
<head>
<!-- 新 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>
</head>


<body>
<form role="form">
<div class="form-group">
<label for="exampleInputEmail1" class="col-sm-2 control-labal">Address</label>
<div class="col-sm-10">
<input type="email" class="form-control" id="exampleInputEmail1" placeholder="Please input your email" >
</div>
</div>
<div class="form-group">
<label for="exampleInputPassword1" class="col-sm-2 control-labal">Password</label>
<div class="col-sm-10">
<input type="password" class="form-control" id="exampleInputPassword1" placeholder="Please input your password">
</div>
</div>
<div class="form-group">
<label for="exampleInputFile" class="col-sm-2 control-labal">File input</label>
<input type="file" id="exampleInputFile">
<p class="help-block" class="col-sm-2 control-labal">Example block-level help text here.</p>
</div>
<div class="checkbox">
<label>
<input type="checkbox"> Check me out
</label>
</div>
<button type="submit" class="btn btn-default">Submit</button>
</form>

</body>
</html>
15 changes: 15 additions & 0 deletions labs/1414080902124/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
$( "#target" ).submit(function( event ) {
alert( "Handler for .submit() called." );
event.preventDefault();
});

$.ajax({
url: "success.json
}).done(function(data) {
if ( console && console.log ) {
console.dir(data);
alert(data.msg);
}
});


3 changes: 3 additions & 0 deletions labs/1414080902124/success.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"msg": "����ɹ���"
}