Example: Request the test.php page, but ignore the return results.
1
|
|
Example: Request the test.php page and send some additional data along (while still ignoring the return results).
1
|
|
Example: Pass arrays of data to the server (while still ignoring the return results).
1
|
|
Example: Send form data using ajax requests
1
|
|
Example: Alert the results from requesting test.php (HTML or XML, depending on what was returned).
1
2
3
|
|
Example: Alert the results from requesting test.php with an additional payload of data (HTML or XML, depending on what was returned).
1
2
3
4
|
|
Example: Post to the test.php page and get content which has been returned in json format (<?php echo json_encode(array("name"=>"John","time"=>"2pm")); ?>).
1
2
3
4
5
|
|
Example: Post a form using ajax and put results in a div
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
|
|
沒有留言:
張貼留言