1
我用jQuery加載一個頁面是這樣的:圖像不加載,jQuery的
$('#container').load('books/book1/inleiding.php');
然而,圖像是,圖書/ BOOK1 /圖像所以inleiding.php它只是圖像/ someImage.jpg
當我加載頁面,然後圖像的鏈接保持不變,因此不起作用。
我也試過:
$.get('books/book1/inleiding.php', function(data) {
$('#container').html(data);
alert('Load was performed.');
});
但這有同樣的問題,有沒有一個簡單的解決方法?
你說的加載圖像是什麼意思?你是否僅僅使用php的img標籤迴應html代碼?也分享你的PHP代碼。 – slash197 2012-03-25 11:38:05
是的,使用絕對URL-s爲您的圖像 – 2012-03-25 11:38:24