-2
我使用ajax上傳圖像。但是,在ajax響應之後,我試圖在該響應的div中顯示圖像。我面臨的問題是在特定的img標籤後面或最後一個img標籤的末尾添加圖像。在特定img標記後插入圖像中的圖片
我使用ajax上傳圖像。但是,在ajax響應之後,我試圖在該響應的div中顯示圖像。我面臨的問題是在特定的img標籤後面或最後一個img標籤的末尾添加圖像。在特定img標記後插入圖像中的圖片
$(function(){
$.ajax({
url:'abc.xyz',
//more options here,
success:function(data){/
//logic to append data after last image
$(data).appendAfter("img:last"); // assuming data as html
}
})
})
請顯示你的代碼,你已經嘗試過。 – talentedandrew