这是我的 json 回复:-
{"Value":[{"Image":"http://xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx/688_dummyadd.jpg","TargetUrl":"http://www.xxxxxxxxxxx.com/xxxxxxx/xxxxxxxxxxs/xxxxxxxxxxxxxxxxxxxxxxx.html","Remark":"Sucess"}]}
这是我的 .js 代码:-
function showAds(url) {
$.ajax({
url: url,
type : "GET",
dataType : "json",
contentType: "application/json",
async : false,
success : function(msg) {
respo = msg.Value;
$("#adddiv img").remove();
$.each(respo, function(index, value) {
if(value.Image != null) {
image = value.Image;
targetUrl = value.TargetUrl;
$respo = '<img src="'+ image +'" width="266" height="56">';
$('#adddiv').append($respo);
}
});
},
error : function(e) {
console.log(e.message);
alert('Error Occoured');
}
});}
但我无法在屏幕上显示横幅。我该怎么做?我需要改变我的方法吗?