请问大家,使用easyui时查询参数传不过去
时间:2011-10-18
来源:互联网
JS代码如下
JScript code
HTML代码如下
HTML code
后台用request.getParameter("name");取不到值!!
JScript code
$(function(){ var queryString = $('#queryForm').formSerialize(); $('#insigGrid').datagrid({ url: '<%=request.getContextPath()%>/bjtf/ctpf/test.doTestList.hz?'+queryString, //url: '<%=request.getContextPath()%>/bjtf/ctpf/demo/MyJsp22.jsp', title: 'DataGrid', width: 'auto', height: 300, fitColumns: true, nowrap:false, pagination:true, rownumbers:true, pageSize:10, columns:[[ {field:'UId',title:'编号',width:80}, {field:'UName',title:'姓名',width:100}, {field:'UCode',title:'代码',width:80,align:'right'}, {field:'new',title:'数量',width:80,align:'right'} ]] }); $('#submitBtn').click(function(){ var qp = $('#insigGrid').datagrid('options').queryParams; qp.name = $('#cname').attr('value'); $('#insigGrid').datagrid('options').queryParams = qp; $('#insigGrid').datagrid('reload'); }); });
HTML代码如下
HTML code
<body> <div id="" class="easyui-panel" title="查询条件" collapsible="true" style="padding:5px;"> <form id="queryForm" method="get" action="<%=request.getContextPath()%>/bjtf/ctpf/demo/MyJsp2.jsp" style="margin-bottom: 2px;"> <fieldset style="width:100%;"><!-- legend>表单验证</legend --> <table id="queryForm" style="width:100%;"> <tr> <td width="15%"><label for="cname">姓名:</label></td><td width="35%"><input id="cname" name="name" size="25" class="easyui-validatebox" /></td> <td width="15%"><label for="cemail" class="slabel">E-Mail:</label></td><td width="35%"><input id="cemail" name="email" class="easyui-validatebox" validType="email"/></td> </tr> <tr> <td><label for="curl" class="slabel">网址:</label></td><td><input id="curl" name="url" size="25" class="url" value="" /></td> <td><label for="ccomment" class="slabel">内容:</label></td><td><input id="ccomment" name="comment" class="required" /></td> </tr> <tr> <td colspan="4" align="center"> </td> </tr> <tr> <td colspan="4" align="center"><input id="submitBtn" class="submit" type="button" value="提 交" /><input type="reset" value="取 消"/></td> </tr> </table> </fieldset> </form> </div> <br/> <div id="" class="easyui-panel" title="查询结果" collapsible="true" style="padding:5px;"> <table id="insigGrid"></table> </div>
后台用request.getParameter("name");取不到值!!
作者: calvin_wyx 发布时间: 2011-10-18
大家百忙之中帮忙看看啊
作者: calvin_wyx 发布时间: 2011-10-18
相关阅读 更多
热门阅读
-
office 2019专业增强版最新2021版激活秘钥/序列号/激活码推荐 附激活工具
阅读:74
-
如何安装mysql8.0
阅读:31
-
Word快速设置标题样式步骤详解
阅读:28
-
20+道必知必会的Vue面试题(附答案解析)
阅读:37
-
HTML如何制作表单
阅读:22
-
百词斩可以改天数吗?当然可以,4个步骤轻松修改天数!
阅读:31
-
ET文件格式和XLS格式文件之间如何转化?
阅读:24
-
react和vue的区别及优缺点是什么
阅读:121
-
支付宝人脸识别如何关闭?
阅读:21
-
腾讯微云怎么修改照片或视频备份路径?
阅读:28