这里运用到easyUI的窗口模式和form表单的提交制作一个有条件的导出excel数据统计的功能,主要是知道了怎么运用easyUI的窗口和表单jsp中:
<!-- 导出数据来源条件窗口 --><div id="exportSign" ><form id="condition" method="post"> <div><label for="distinguish">是否分中英文:</label><select id="cc" class="easyui-combobox" name="distinguish" style="width:50px;panelHeight:20px;"> <option value="1">是</option> <option value="0">否</option> </select></div> <div> <label for="start">开始时间:</label><input id="dd" type= "text" name="start" class="easyui-datetimebox" />(可不选) </div><div><label for="end">结束时间:</label><input id="ee" type= "text" name="end" class="easyui-datetimebox" />(可不选)</div></form> </div>
js中:
function exportSign(){var signdialog = $('#exportSign').dialog({title:"设置导出条件",width:300,height:200,modal:true,cache:false,buttons:[{text:"导出",handler:function(){$("#condition").form("submit",{url:"${basePath}/manage/visitorAction.do?method=exportRegSignByCondition",onSubmit:function(){return $(this).form("validate");},success:function(data){//成功时可以做的事,待完善}});}}] });}