Can I make a jQuery JSONP request without adding the '?callback=' parameter in URL?

Check the jQuery docs - they say to say jsonp: false and jsonpCallback : ‘callbackFunction’ in the ajax args….like:

1
2
3
4
5
6
7
8
$.ajax({
url: 'http://cross-domain.com/the_jsonp_file',
//jsonp : false,
jsonpCallback: 'jsonCallback',
// contentType: 'application/json', -- you can't set content type for a <script> tag, this option does nothing for jsonp | KevinB
//cache: 'true',
dataType : 'jsonp'
});

http://api.jquery.com/jQuery.ajax/

坚持原创技术分享,您的支持将鼓励我继续创作!