<script>
$(document).ready(function(){
$("#comboBox1").change(function() {
var text2 = $(this).children(':selected').text();
var value2 = $(this).val();
});
});
</script>
<body>
<form>
<select id="comboBox1">
<option value="val1">opt1</option>
<option value="val2">opt2</option>
</select>
//这里我有一个名为MyUtill的类,它有方法findArray with require 1参数 //我需要从javascript变量value2传递组合选择的值,那么如何在脚本中获取该变量
<%
Map<String,String> myMap = MyUtil.findArray(variable); // variable require javascript value2 variable so how can i get
%>
</form>
</body>