详情选择标签

<form id="form" name="form" method="post" action="/sf_js_api/tag/toSelect.do" onsubmit="return false;">

			<div sf_type="SF_CheckBoxGroup" id="SF_USERS" length="8" textField="LNAME" valueField="ID"></div>
			<input type="button" value="确定" onclick="M_Sf_js_api.getSelectInfo();" />
		</form>



M_Sf_js_api.getSelectInfo = function() {
			var str = "";
			
			$("input:checkbox:checked").each(function(){    //获取id和名称的凭借字符 格式为 id:name,id1:name1
				var text =  $(this).val()+":"+$(this).next().text();
				str += text+"," ;
			});
			
			if(!SF_DataConvert.isNullOrEmpty(str)){
				str = str.substring(0, str.length);
			}
		
			parent.$("#sf_ds_user").attr("data",str);
			parent.$.XYTipsWindow.removeBox(); //关闭弹窗
		};

  

@RequestMapping("toSelect.do")
	public ModelAndView toSelect(HttpServletRequest request,HttpServletResponse response, ModelMap modelMap) {
		FormSource source = this.source(request);
		TagService service = this.createService();
        
        try {
			List<?> list = service.beans(new SF_USERS());//查询所有用户信息
			source.add("SF_USERS",list);
			source.put(modelMap);
		} catch (Exception e) {
			this.logger.error(e);
		}
        
        return new ModelAndView( this.getActionPath("detailselector_select"), modelMap );

	}

  

-------------------------------------------------------------------------
## 极客时间全网最便宜最优惠购买方式,优惠券返现 百度网盘 微信关注公众号“选门好课”
扫描下方二维码关注我的公众号"选门好课",与我一起交流知识
原文地址:https://www.cnblogs.com/singworld/p/9758814.html