-
Notifications
You must be signed in to change notification settings - Fork 75
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #280 from CXCong/master
#2 提交实验代码
- Loading branch information
Showing
3 changed files
with
47 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{ | ||
"msg": "注册成功!" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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() | ||
}); | ||
}) | ||
|