我的代码是
var context='<div id="info"><div class="info_content"><div class="info_contentt"><div class="info_contenttt"><b>'+locations[i][0]+'</b></div><div class="info_contenttm"><div class="info_contenttml"><b>IMAGE</b></div><div class="info_contenttmr"><b>'+locations[i][6]+'</b></div></div><div class="info_contenttb">Rainfall, <b>'+locations[i][7]+'</b></div></div><div class="info_contentb"><table><tr><td>Get: </td><td><img src="http://marylandbeaches.mowbi.com/site/images/btn-alert-email.png" onclick="emailFunction('+locations[i][5]+')" /></td><td><img src="http://marylandbeaches.mowbi.com/site/images/btn-alert-text.png" onclick="mobileFunction('+locations[i][5]+')" /></td></tr></table> </div></div></div>';
我的另一个代码
var image='g.jpg';
现在我如何在这个div IMAGE文本中附加var图像
<div class="info_contenttml"><b>IMAGE</b></div>
答案 0 :(得分:0)
var context='<div class=info_contenttml><img src="+image+"/></div>';