我正在使用GD库绘制图像,然后我将使用jquery ajax获取该图像。但是当我更新图像时,jquery ajax无法获取更新的图像,而当我检查目录时,图像却更新了——如何在jquery ajax响应中获取更新的图像?
我的用于从php文件获取响应的jquery代码如下:
jQuery.ajax({
type: "POST",
url: "create.php",
dataType:"text",
data:myData,
success:function(response){
//location.reload();
var result = response.split("|");
document.getElementById('img').innerHTML = result[0]; // This is the image
document.getElementById('download').innerHTML = result[1]; // this is a href link for some other purpose
},
error:function (xhr, ajaxOptions, thrownError){
alert(thrownError);
}
});
请帮助我,谢谢!