使用jQuery,您可以使用像
$("#myimage").attr('src','img url');假设您的回应
data.imgsrc是这样的,
$("#myimage").attr(src, data.imgsrc);$.ajax({ url: 'clmcontrol_livematchupdate', type: 'post', dataType: 'json', success: function (data) { $('#mstatus').html(data.matchstatus); $("#myimage").attr('src','img url'); }, complete: function () { // Schedule the next request when the current one has been completed setTimeout(ajaxInterval, 4000); } });


