In servlet, use
HttpServletRequest#getParameterValues()
http://stackoverflow.com/questions/4184299/how-to-pass-the-value-of-listbox-from-jsp-to-servlet
http://stackoverflow.com/questions/2407945/how-to-get-multiple-selected-values-from-select-box-in-jsp
E.g. in javascript
var x = document.getElementById("user_list");
for (var i = 0; i < x.options.length; i++) {
if(x.options[i].selected ==true){
alert(i + ": " + x.options[i].selected + ": " + x.options[i].value + ": " + x.options[i].text);
}
}
No comments:
Post a Comment