-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpost.html
More file actions
31 lines (28 loc) · 703 Bytes
/
post.html
File metadata and controls
31 lines (28 loc) · 703 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
<!DOCTYPE html>
<html>
<head>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.11.0/jquery.min.js">
</script>
<script>
$(document).ready(function(){
$("button").click(function(){
$.post("http://localhost:3000/createuser",
{
"user[name]":"Stallion22 11",
"user[email]":"TierDelta22@gmail.com",
"user[password]":"123456",
"user[password_confirmation]":"123456",
"commit":"Create+my+account",
},
function(data,status){
alert("Data: " + data + "\nStatus: " + status);
});
// alert(xmlHttp.responseText);
});
});
</script>
</head>
<body>
<button>Send an HTTP POST request to a page and get the result back</button>
</body>
</html>