-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathajax.html
More file actions
35 lines (33 loc) · 752 Bytes
/
ajax.html
File metadata and controls
35 lines (33 loc) · 752 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
31
32
33
34
35
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title></title>
</head>
<body>
<input type="text" id="ipt"/>
<button type="button">发送</button>
</body>
<script src="js/jquery-1.10.1.min.js"></script>
<script>
$('button').on('click',function(){
$(function(){
$.ajax({
type:"get",
url:"http://www.tuling123.com/openapi/api",
dataType:"JSON",
jsonP:"callback",
data:{'key':'b8680786b6714ae4953c72d6cde9c556','info':$('#ipt').val(),'userid':'12345678'},
success:function(str){
console.log(str);
}
})
})
})
</script>
<!--<script src="http://int.dpool.sina.com.cn/iplookup/iplookup.php?format=js"></script>
<script>
var city = remote_ip_info;
console.log(city);
</script>-->
</html>