データを入力したい選択ボックスのある単純なフォームがありますが、その方法がわかりません。
これは私のフォームです:
<form name="form">
<select name="req_one" style="width:250px;"/> </select>
</form>
これは私がJSで試したことです:
var name = 'test';
var i = 1;
document.form.req_one =new Option(name, i);
これにより、同等の結果が得られるはずです。
<option value="1"> Test </option>
私は何が間違っているのですか?