-
Notifications
You must be signed in to change notification settings - Fork 0
/
jsontest.html
53 lines (52 loc) · 1.86 KB
/
jsontest.html
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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
<!DOCTYPE html>
<html>
<head>
<title>TODO supply a title</title>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<script type="text/javascript" src="js/jquery-2.1.4.min.js"></script>
<script type="text/javascript">
$(document).ready(function() {
$("#testwithout").click(function() {
var name = $("#name").val();
$.ajax({
url: 'http://erhatesschonwiedergetan.de/',
method: "POST",
data: {
xmlhttp: true,
name: name,
inc: false
},
success : function(data) {
$("#output").html(data);
}
});
});
$("#test").click(function() {
var name = $("#name").val();
$.ajax({
url: 'http://erhatesschonwiedergetan.de/',
method: "POST",
data: {
xmlhttp: true,
name: name,
inc: true
},
success : function(data) {
$("#output").html(data);
}
});
});
});
</script>
</head>
<body>
<div>
<input id="name" type="text" placeholder="name">
<input id="testwithout" type="button" value="Test without increment">
<input id="test" type="button" value="Test with increment">
</div>
<div id="output">
</div>
</body>
</html>