JSP から DropDown リストの値を読み取る方法を知りたいです。以下は私のJSPのコードです。
<fieldset>
<s:form theme="simple" enctype="multipart/form-data" name="uploadDocument" method="POST" action="?">
<table>
<tr>
<td wrap>Select The Type of Letter to Upload:</td><td><s:select id="letters" list="letterList" name="ListofLetters" headerKey="-1" headerValue="--Select The Letter Type--"/></td>
<tr>
<td nowrap ><s:file name="userFile" label="userFile" size="25" id="upload" /></td>
<td class="button-blue"><s:submit action="Upload" value="Attach File" onclick=" return validateFile()"/></td>
</tr>
</table>
</s:form>
</fieldset>
リストはデータベースから動的に入力されます。キーではなくドロップダウンリストの値を取得する方法を知りたいと思いました。なぜなら、私が使用したとき
document.getElementById('letters').value
「0、1、2など」のようなキー値を返します。適切なチェックを実行できるように、個々のキーに関連付けられた値を取得するにはどうすればよいですか。前もって感謝します :)