0
g_regions = ["USD", "North America", "EUR", "Europe", "GBP", "United Kingdom", "USD", "Asia & Pacific", "USD", "Australasia", "USD", "South America", "USD", "Africa"];
以上數值使用jQuery的是顯示在select dropdown
。jQuery對象數據奇偶值到在選擇奇數作爲選項值顯示,即使選擇文本
爲如:像這樣
<select>
<option value="USD">North America</option>
<option value="EUR">Europe</option>
<option value="GBP">United Kingdom</option>
<option value="USD">Asia & Pacific</option>
<option value="USD">Australasia</option>
<option value="USD">South America</option>
<option value="USD">Africa</option>
</select>
'$ {g_regions [i]}'的用途是什麼?它是如何解釋的?還要加上 –
這是賦值或者用數值替換,它的一個'ES6'標準使用變量裏面的倒數 – Shiladitya
謝謝@Shiladitya,它工作正常 – user3101664