-4
我有一個功能,可以將選定的相冊和選定的標題插入到說明框中,然後我想插入相應的作品與該歌曲。但是使用html + =似乎不起作用。前兩個html + =很好。用html +插入圖片=
function createSongInfo(album_index, song_length) {
var html = "";
html += "You have selected album: " + albums[album_index].title;
html += "<br>You have selected song: " + albums[album_index].tracks[song_length].title;
html +=<img src='"files/artwork/"+albums[album_index].artwork+".jpg"' alt="Album Artwork">;
writeIframe("all_details_frame", html);
}
你有沒有嘗試過使用正確的字符串,而不是那是什麼? – Krease 2014-11-22 20:30:39
是的,我已經修復了謝謝Seckin,我不確定我的引用是否會像那樣工作,我意識到現在我應該使用斜槓技術。 @克里斯你的意思是一個適當的字符串? – 2014-11-22 20:38:06
查看下面的答案... – Krease 2014-11-22 20:39:55