0
如何爲以下代碼設置和更新幫助文本的值?基於下拉選擇的jQuery更新幫助文本
的HTML代碼:
<select class="form-control" id="product-id" name="product-id">
<option value="2">Beauty Products</option>
<option value="6">Health Products</option>
<option value="7">Gaming Products</option>
</select>
<p class="text-info" id="help-text">Total images: 5000/Used in last project: 2000</p>
而且JSON數據從該值需要進行設置:
<script>
var keyCount =
[{"id":"2","name":"Beauty Products","img_count":"5000","img_used":"2000"},
{"id":"6","name":"Health Products","img_count":"7000","img_used":"4001-7000"},
{"id":"7","name":"Gaming Products","img_count":"9500","key_used":"0"}]
</script>
,你能否告訴我們,到目前爲止,你做了什麼? –