0
任何人都可以告訴我如何正確使用myVariable和myVariable2在JavaScript變量稱爲siteContents2?此時我的代碼不顯示圖像縮略圖及其名稱。如何在另一個javascript變量裏面使用圖片url變量?
var siteContents2=""
+"<li>"
+"<img src=""+myVariable2+"" width=\"180\" height=\"148\""
+"alt=\"'+myVariable+'\" class=\"png\">"
+"<a href=\"'+myVariable+'" class=\"corners\"> <\/a>"
+""
+" "
+" "
+" "
+"<div class=\"thumbnail_label\">mango<\/div>"
+" "
+" "
+" "
+""
+"<div class=\"details\">"
+"<div class=\"title\">"
+" <a href="
+" \"'+myVariable+'">"+myVariable+"<\/a>"
+" <span class=\"season\">2<\/span>"
+" <\/div>"
+" <ul class=\"subject\">"
+" <li>mango sesaon<\/li>"
+" <\/ul>"
+" <ul class=\"sub-info\">"
+" <li class=\"location\">us<\/li>"
+" <li class=\"price\">2 dollar<\/li>"
+" <\/ul>"
+" <\/div>"
+"<\/li>";
$('#myDiv').append(siteContents2)