I have the ability to pass json data using ajax background
json
json
HiJsonjson
bejson
html
ajax
Ajax code is as follows
$(function(){
var mydata;
var mydata2;
var period;
$.ajax({
type : "GET",
url : "homeAction_generateRecentData.action?recentDate=7",
dataType:"JSON",
success: function(data){
mydata = JSON.parse(data.data.loginTimeJson);
mydata2 = JSON.parse(data.data.registerTimeJson);
},
complete:function(){
$("-sharpindexLoading").css("display","none");
$("-sharpperiod").text(period);
initECharts(data,data2);
},
error:function(){
$("-sharpindexLoading").html("");
}
});
});
I am puzzled!
also hope all kinds of immortals to help! Thank you very much!