-
Notifications
You must be signed in to change notification settings - Fork 0
/
ajax_test.html
33 lines (29 loc) · 1007 Bytes
/
ajax_test.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
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Weather Forecast</title>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<script src="./js/jquery-2.1.1.min.js"></script>
<link rel="stylesheet" href="./css/bootstrap.min.css">
<link rel="stylesheet" href="./css/bootstrap-theme.min.css">
<script src="./js/jquery.validate.min.js"></script>
<script src="./js/bootstrap.min.js"></script>
<script src="./js/OpenLayers.js"></script>
<script>
$.ajax({
url: "http://localhost:46484/HW8_MAIN/test.php",
dataType: 'json',
data: {}
})
.done(function(data) {
var json_data = JSON.parse(data);
alert("Success: " + json_data.latitude);
})
.fail(function() {
alert("Error");
});
</script>
</head>
<body></body>
</html>