这是代码
$.ajax({
url: "http://127.0.0.1:8080/changepicture",
type: 'POST',
data: formData1,
crossDomain: true,
async: true,
cache: false,
contentType: false,
processData: false,
success: function (data) {
var pictureValue = decodeURIComponent(data);
var imageToReplace =
'<imgsrc=http://127.0.0.1:8080/public/images/'+pictureValue+ '>';
$("#topImageAjax1").replaceWith(imageToReplace);
console.log(data);
},
error: function (data){
alert("Oooops cannot connect to server now");
console.log('something went wrong!!!')
}
我在浏览器控制台上获取:
获取http://127.0.0.1:8080//public/images/0001b.jpg 404(未找到)
请问我该如何解决这个问题。