In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-19 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/03 Report--
This article mainly introduces "how to achieve php jq jquery getJSON cross-domain submission of data", in daily operation, I believe many people have doubts on how to achieve php jq jquery getJSON cross-domain submission of data, Xiaobian consulted all kinds of information, sorted out simple and easy to use operation methods, hope to answer "how to achieve php jq jquery getJSON cross-domain submission of data" doubts helpful! Next, please follow the small series to learn together!
Front end requester:
The copy code is as follows:
$(function() { $.getJSON('http://test.com/aa.php? callback=? ',{classid:1,num:2},function(json){ alert(json.key); }); });
Requested end:
The copy code is as follows:
$classid=$_GET['classid'];
$num=$_GET['num'];
if($classid&&$num){$results = array("key" => "value"); echo $_GET['callback'] . '(' . json_encode($results) . ')'; }
The key is callback This variable in the output json data to bring callbak, the value consistent can getJSON success, otherwise will not execute any operation in function(json) {…}
At this point, the study of "how to implement php jq jquery getJSON cross-domain submission data" is over, hoping to solve everyone's doubts. Theory and practice can better match to help you learn, go and try it! If you want to continue learning more relevant knowledge, please continue to pay attention to the website, Xiaobian will continue to strive to bring more practical articles for everyone!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.