Created
June 11, 2011 09:07
-
-
Save tokkonopapa/1020393 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* http://jsfiddle.net/echo/jsonp/ */ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<div id="result"><p>本日の結果</p></div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$(function() { | |
$.ajax({ | |
type: 'GET', | |
cache: true, | |
dataType: "jsonp", | |
url: "http://jsfiddle.net/echo/jsonp/", | |
data: { | |
"1st": "ヤクルト", | |
"2nd": "中日", | |
"3rd": "巨人", | |
delay: 3 | |
}, | |
jsonp: "callback", | |
jsonpCallback: "somefunc", | |
}).success(function(data, textStatus, jqXHR) { | |
$("#result").append("<p>1st:" + data["1st"] + ", 2nd:" + data["2nd"] + ", 3rd:" + data["3rd"] + "</p>"); | |
}); | |
}); | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: jsonp | |
description: jsonp のテスト | |
authors: | |
- tokkonopapa | |
resources: | |
- https://getfirebug.com/firebug-lite-debug.js | |
normalize_css: yes |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment