Jquery 跨域请求
<html> <head> <title>Test Jquery</title> <script type="text/javascript" src="https://ajax.aspnetcdn.com/ajax/jQuery/jquery-1.9.1.min.js" data-do-not-move="true" data-provides="jQuery"></script> <script> //???? function showData (result) { var data = JSON.stringify(result); //json??????? $("#text").val(data); } $(document).ready(function () { $("#btn").click(function () { //跨域请求百度 $("head").append("<script src='https://feed.baidu.com/feed/api/wise/feedlist?sid=124614_125822_114552_122159_119747_125649_123094_125354_120127_118887_118869_118851_118835_118790_107312_125007_117332_124977_117431_125776_122789_125653_125312_124939_125487_125172_125288_125710_125283_124937_125038_125466_124030_110085_123289_125645_125427&ssid=d22777677363640500&from=844b&pu=sz%25401320_1001%252Cta%2540iphone_2_4.3_3_534&qid=3271620540&clickDownload=0&tabId=1&page=1&sessionId=15366596716398&crids=&startlistnum=8&rfs=7&loadeditems=newsThree%2CtypeLargePics%2CecomAds%2C&_=1536659683951&callback=showData'><\/script>"); }); }); </script> </head> <body> <input id="btn" type="button" value="kuayu POST" /> <textarea id="text" style="width: 400px; height: 100px;"></textarea> </body> </html>
更多:参考 https://www.cnblogs.com/chiangchou/p/jsonp.html
fffffffffffffffff
test red font.