1,JSP里面用easyui实现
新建json文件
IndicatorModel.json
[{
"id":"不判断",
"text":"不判断",
"selected":true,
"desc":"不判断"
},{
"id":"SAR首次转多头蓝点",
"text":"SAR首次转多头蓝点",
"desc":"SAR首次转多头蓝点"
},{
"id":"CCI首过+100",
"text":"CCI首过+100",
"desc":"CCI首过+100"
},{
"id":"短MA35102030粘合",
"text":"短MA35102030粘合",
"desc":"短MA35102030粘合"
},{
"id":"跌超5%以上",
"text":"跌超5%以上",
"desc":"跌超5%以上"
}]
JSP里面写上:
<tr>
<td>搜索日辅助判断1</td>
<td>
<input class="easyui-combobox"
name="otherIndicatorModel"
style="width: 300px"
data-options="
url:'${basePath}/static/json/IndicatorModel.json',
method:'get',
valueField:'id',
textField:'text',
multiple:true,
panelHeight:'auto'
">
</td>
<td><p title="搜索日,其他指标辅助判断" class="sm easyui-tooltip"></p></td>
</tr>
2,后台获取
//其他指标辅助判断
String otherIndicatorModel2 = request.getParameter("otherIndicatorModel2");
上面的JSP页面也可以使用传统的html的checkbox来实现
<input type="checkbox" name="otherIndicatorModel" checked="checked" value="不判断">不判断<br />
<input type="checkbox" name="otherIndicatorModel" value="SAR首次转多头蓝点">SAR首次转多头蓝点<br />
<input type="checkbox" name="otherIndicatorModel" value="CCI首过+100">CCI首过+100<br />
<input type="checkbox" name="otherIndicatorModel" value="短MA35102030粘合">短MA35102030粘合<br />
<input type="checkbox" name="otherIndicatorModel" value="跌超5%以上">跌超5%以上