js获取所选下拉框已经checkbox框内容的方法以及后台如何存储

function say() {
  var p = "";
  $("input:checkbox[name='checks']:checked").each(function() {
    p += $(this).val() + ",";
  });
  $("#atype").val(p);
  var se = "";
  $("select option:selected").each(function() {
   if ($(this).val() == "") {
    se +=",";
   } else if ($(this).val() == "1") {
    se += "<" + ",";
   } else {
    se += $(this).val() + ",";
   }
  });
  $("#options").val(se);
 }

 

 

<input type="hidden" name="atype" id="atype" value="" /> <input
     type="hidden" name="options" id="options" value="" />

String columns[] = null;

String atype = request.getParameter("atype");

String column = atype.substring(0, atype.lastIndexOf(","));

    columns = column.split(",");

posted @ 2018-03-16 14:44  笑的像个坏人  阅读(135)  评论(0)    收藏  举报