Can you give a very simple example of reading a jsonp request with jquery? I just can't get it to work.
相关问题
- Carriage Return (ASCII chr 13) is missing from tex
- How to fix IE ClearType + jQuery opacity problem i
- jQuery add and remove delay
- Using :remote => true with hover event
- Is there a way to play audio on a mobile browser w
Here is working example:
Notice the
?callback=?
at the end of the requested URL. That indicates to thegetJSON
function that we want to use JSONP. Remove it and a vanilla JSON request will be used. Which will fail due to the same origin policy.You can find more information and examples on the JQuery site: http://api.jquery.com/jQuery.getJSON/