87,914
社区成员
发帖
与我相关
我的任务
分享
function getJson(){
$.ajax({
async : false,
cache : false,
type : 'POST',
url : 'http://www.xxxx.com/xxxx.ashx',//B站的后台C#代码
data : {
"xxx" : xxx //你要传递的参数
},
dataType : "json",
error : function() {//请求失败处理函数
alert('请求失败');
},
success : function(data) {
if (data != null) {
//data就是你要的json数据,在这里写你接下来的业务逻辑 } else {
alert('请求失败');
}
}
});
}