0
<html>
<head>
<script type="text/javascript">
function changeFunc() {
var selectBox = document.getElementById("selectBox");
var selectedValue = selectBox.options[selectBox.selectedIndex].value;
alert(selectedValue);
}
</script>
</head>
<body>
<select id="selectBox" onchange="changeFunc();">
<option value="1">Option #1</option>
<option value="2">Option #2</option>
</select>
</body>
</html>
我们可以得到的SelectedValue早在JSP作为的onChange参数,并通过它来形成一个隐藏的变量,并把它回支柱作用?获取JavaScript计算值Struts动作
的可能的复制[如何获得形式的JavaScript计算值(http://stackoverflow.com/questions/36671921/how-to-get-javascript-calculated在表单中的值) –
*倒票最喜欢的* :) –
我不知道这个问题实际上是什么 - 将值放入隐藏的窗体属性,你就完成了。 –