Skip to content

Commit

Permalink
Merge pull request #280 from CXCong/master
Browse files Browse the repository at this point in the history
#2 提交实验代码
  • Loading branch information
zengsn authored Oct 28, 2016
2 parents 2a5ac0e + 62755a4 commit dfdb55f
Show file tree
Hide file tree
Showing 3 changed files with 47 additions and 0 deletions.
29 changes: 29 additions & 0 deletions labs/1414080902105/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
<html>
<head>
<title>注册界面</title>
<script src="http://code.jquery.com/jquery.js"></script>
<script language="javascript" src="test.js"></script>

</head>
<body>
<h3 align="center">用户注册界面</h3>
<form>
<table align="center">
<tr>
<td>用户名:</td>
<td><input type="text" name="uersName" placeholder="请输入用户名"/></td>
<td>输入注册的用户名!</td>
</tr>
<tr>
<td>密码:</td>
<td><input type="text" name="passWord" placeholder="请设置密码"/></td>
<td>设置登录密码!</td>
<tr>
<td><input type="submit" value="注册" class="btn-default">
<input type=reset value="取消">
</td>
</tr>
</table>
</form>
</body>
</html>
3 changes: 3 additions & 0 deletions labs/1414080902105/success.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"msg": "注册成功!"
}
15 changes: 15 additions & 0 deletions labs/1414080902105/test.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
$(function(){
$( "form" ).submit(function( event ) {
alert( "注册成功" );
$.ajax({
url: "success.json
}).done(function(data) {
if ( console && console.log ) {
console.dir(data);
alert(data.msg);
}
});
event.preventDefault()
});
})

0 comments on commit dfdb55f

Please sign in to comment.