我已經在腳本中聲明數組:的JavaScript - 填充下拉列表與數組
var myArray = new Array("1", "2", "3", "4", "5" . . . . . "N");
我有一個包含一個下拉菜單形式:
<form id="myForm">
<select id="selectNumber">
<option>Choose a number</option>
</select>
</form>
使用JavaScript,怎麼會我用數組值填充下拉菜單的其餘部分?使得選項將是 「選擇一個號碼」, 「1」, 「2」, 「3」, 「4」, 「5」。 。 。 。 。 「N」?
的一些注意事項,請發表您的嘗試和任何錯誤消息(S)你得到。謝謝。 – bernie 2012-03-27 18:11:37