2017-03-09 33 views
-2
`jQuery('#resultWorkingDays').html(numberWithCommas(resultWorkingDays) + ' days')` 

在字符串的末尾使用上面的打印日期。我想將'天'改爲圖像源。我搜索了&嘗試了很多不同的東西,但似乎沒有工作。簡單的Javascript圖像

完整的JS新手,非常感謝

+1

那些是什麼,你已經試過的東西呢? – krillgar

回答

1

只包含HTML。

jQuery('#resultWorkingDays').html(numberWithCommas(resultWorkingDays) + ' <img src="yourImage.jpg">'); 
+0

謝謝!我嘗試了所有,但似乎,你必須開始某處,非常感謝 – BadBoyClub

+0

我們都是初學者一次。祝你好運! –

0
jQuery("#resultWorkingDays").html(numberWithCommas(resultWorkingDays) + "<img src='\images\...\name.png />"); 
+1

嗨,請閱讀http://stackoverflow.com/help/how-to-answer,並嘗試爲此代碼段提供一些解釋。 謝謝。 –