どなたか教えてください
<script language="JavaScript">
function test1() {
window.alert(document.form1.sel.value);
}
function test2() {
document.form1.sel.length=0;
document.form1.sel.length++;
document.form1.sel.options[0].text="じゅう";
document.form1.sel.options[0].value=10;
document.form1.sel.length++;
document.form1.sel.options[0].text="にじゅう";
document.form1.sel.options[0].value=20;
}
</script>
<SELECT NAME="sel" SIZE="integer">
<OPTION VALUE="1">いち
<OPTION VALUE="2">に
<OPTION VALUE="3">さん
</SELECT>
<INPUT TYPE="button" VALUE="確認" ONCLICK="test1();">
<INPUT TYPE="button" VALUE="変更" ONCLICK="test2();">
↑このように、セレクトを動的に変更して document.form1.sel.value を取得
したいのですが、ザウルスのNetFrontで実行すると、↓このような動きになります
(1) 表示初期後に「に」を選択して「確認」ボタンクリック→「2」が表示される
(2)「変更」ボタンクリック
(3) 「にじゅう」を選択して「確認」ボタンクリック→「にじゅう」が表示される
valueではなく、textが表示されてしまいます
IEで同じような処理をすると、きちんとvalueが表示されます
原因がわかる方、ご教授お願いいたします