-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathajax.ejs
31 lines (30 loc) · 890 Bytes
/
ajax.ejs
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
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<script type="text/javascript" src="/javascripts/ajax.js"></script>
<script type="text/javascript" src="/javascripts/jquery.js"></script>
<script type="text/javascript" src="/javascripts/ajaxAction.js"></script>
</head>
<body>
<script type="text/javascript">//
ajax({
method:'GET',//
responseType:'json',
url:'http://localhost:3000/ajax',
params: [{name:'yhj', age:{name:'yzh', age:'23'}},{name:'yhj', age:{name:'yzh', age:'23'}}],//[{name:'yhj', age:'22'},{name:'yzh', age:'23'}]
}, {
success:function(result) {
alert(result)
},
}).send();
/*
ajaxAction({url:'http://localhost:3000/ajax', method:'POST'}, [{name:'yhj', age:{name:'yzh', age:'23'}},{name:'yhj', age:{name:'yzh', age:'23'}}],
{
callbackHandler:function(result) {
},
});
*/
</script>
</body>
</html>