Added support for:
- Cross Domain getScript $.getScript("http://foo.com/script.js"); - JSONP $.ajax({ url: "script.js", type: "jsonp" }); $.getJSON("script.js?callback=?"); - Cross Domain JSONP/getJSON $.getJSON("http://foo.com/script.js?callback=?"); - No-cache Ajax Requests $.ajax({ url: "test.html", cache: false });
This commit is contained in:
parent
456f0fe598
commit
a5dbcaf675
4 changed files with 424 additions and 165 deletions
10
build/test/data/jsonp.php
Normal file
10
build/test/data/jsonp.php
Normal file
|
@ -0,0 +1,10 @@
|
|||
<?php
|
||||
error_reporting(0);
|
||||
$callback = $_REQUEST['callback'];
|
||||
$json = $_REQUEST['json'];
|
||||
if($json) {
|
||||
echo $callback . '([ {"name": "John", "age": 21}, {"name": "Peter", "age": 25 } ])';
|
||||
} else {
|
||||
echo $callback . '({ "data": {"lang": "en", "length": 25} })';
|
||||
}
|
||||
?>
|
|
@ -41,11 +41,11 @@
|
|||
<form id="form" action="formaction">
|
||||
<input type="text" name="action" value="Test" id="text1"/>
|
||||
<input type="text" name="text2" value="Test" id="text2" disabled="disabled"/>
|
||||
<input type="radio" name="radio1" id="radio1"/>
|
||||
<input type="radio" name="radio1" id="radio1" value="on"/>
|
||||
|
||||
<input type="radio" name="radio2" id="radio2" checked="checked"/>
|
||||
<input type="checkbox" name="check" id="check1" checked="checked"/>
|
||||
<input type="checkbox" id="check2"/>
|
||||
<input type="checkbox" id="check2" value="on"/>
|
||||
|
||||
<input type="hidden" name="hidden" id="hidden1"/>
|
||||
<input type="text" style="display:none;" name="foo[bar]" id="hidden2"/>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue