如何获得支撑<;html:选择>;jsp中java脚本中的值

如何获得支撑<;html:选择>;jsp中java脚本中的值,java,javascript,struts,Java,Javascript,Struts,我想要java脚本中的countryid值 <html:select property="countryid" onchange="retrieveURL();"> <html:option value="-1">SELECT</html:option> <html:options collection="countryList" property="countryid" labelProp

我想要java脚本中的countryid值

<html:select property="countryid" onchange="retrieveURL();">
                <html:option value="-1">SELECT</html:option>
                <html:options collection="countryList" property="countryid" labelProperty="countryname" />
        </html:select>

挑选

有人能帮你考虑一下你的名为上传表单的表单吗。在Javascript中,您将执行以下操作

var select = document.uploadForm.countryid;
var value = select.options[select.selectIndex].value;

我希望这能有所帮助。

html:form的名称是什么?html:select位于何处?当您使用JavaScript时,请忘记Struts及其标记。JavaScript只看到生成的HTML.oky JB NiZET,所以您能告诉我如何从HTML集合中获取值吗