投影圖像這是我的邏輯樹:加入設在我與jQuery
consultaBeneficiario.js下面
這是數據表插件的回調:
"fnDrawCallback": function() {
$("tbody td.xls").each(function(){
$(this).html("<img src='../plusDetails.png' onclick = 'dettaglioConsultaPagamentiXLS("+$(this).html()+", \"beneficiario\")\'> XLS </button>");
});
但它不起作用。
這是結果:
如果我這樣做,例如:
$(this).html("<img src='http://i.imgur.com/SD7Dz.png' onclick = 'dettaglioConsultaPagamentiXLS("+$(this).html()+", \"beneficiario\")\'> XLS </button>");
作品。
我使用百里香,如果它可以幫助。
爲什麼?
你用你的圖片的靜態鏈接試試嗎? –
相對圖像路徑基於HTML頁面位置,而不是腳本文件所在的位置。 –
開始標記是'img',但結束標記是'按鈕'! – oneNiceFriend