orders 表单中搜索的操作
js中的代码
function searcher() {
alert($("#sendaddress").val());
$.post("../../csdn/searchOrders.action", {
'orders.customers.id' : $("#custome").val(),
'orders.sendAddress.id' : $("#sendaddress").val(),
'orders.time' : $("#stime").datebox("getValue")
}, function(data) {
if (data != null && data != "") {
var str = data.replace(/\"/g, "");
$("#ordersList").datagrid("load", {
whereSql : str
});
}
});
}
jsp中的代码
<div region="north" title="搜索用户"
style="height: 60px; background: #B3DFDA;">
客户:<input type="text" name="customers" id="custome"/>
送货地址:<input type="text" name="sendaddress" id="sendaddress"/>
订单的时间:<input type="text" name="time" id="stime"/>
<a href="javascript:void(0)" id="search" iconCls="icon-search" οnclick="searcher()">查询</a>
</div>
js中的代码
function searcher() {
alert($("#sendaddress").val());
$.post("../../csdn/searchOrders.action", {
'orders.customers.id' : $("#custome").val(),
'orders.sendAddress.id' : $("#sendaddress").val(),
'orders.time' : $("#stime").datebox("getValue")
}, function(data) {
if (data != null && data != "") {
var str = data.replace(/\"/g, "");
$("#ordersList").datagrid("load", {
whereSql : str
});
}
});
}
jsp中的代码
<div region="north" title="搜索用户"
style="height: 60px; background: #B3DFDA;">
客户:<input type="text" name="customers" id="custome"/>
送货地址:<input type="text" name="sendaddress" id="sendaddress"/>
订单的时间:<input type="text" name="time" id="stime"/>
<a href="javascript:void(0)" id="search" iconCls="icon-search" οnclick="searcher()">查询</a>
</div>