acquiring multiple choice jquery select text string and spliced into

//拼接产品字符串
var productArray = new Array();
$.each($("#fmeatask-subSystem").find("option:selected"), function(index, obj) {
productArray.push($(obj).text());
});
$.each($("#fmeatask-assembly").find("option:selected"), function(index, obj) {
productArray.push($(obj).text());
});

var productStr=productArray.join(",");

Guess you like

Origin www.cnblogs.com/DylanZ/p/11933395.html