function rollback(Data){
var userData = eval("("+ Data.userList+")");
//生成dataGrid
$('#test').datagrid({
title:'用户信息表',
iconCls:'icon-edit',
// url:'getData.action',
loadMsg:'数据加载中,请稍后...',
width:'auto',
height:420,
rownumbers:true,
pagination:true,
singleSelect:false,
idField:'userId',
frozenColumns:[[
{field:'ck',checkbox:true},
{field:'userId',title:'用户编号',width:55,align:'center'},
{field:'userName',title:'用户名',width:100,editor:'text',align:'center'},
{field:'password',title:'密码',width:100,editor:'text',align:'center'},
{field:"createTime",title:'加入时间',width:130},
{field:'opt',title:'操作',width:140,align:'center',
formatter:function(val,rec){
var s='<input type="button" onclick="abc('+rec.userName+')" value="'+val+'">';
var e = '<input type="button" onclick="edit()" value="修改"> ';
var d = '<input type="button" onclick="deleteUser()" value="删除"> ';
return s+e+d;
}
}
]],
toolbar:[
{
id:'btnadd',
text:'添加用户',
iconCls:'icon-adduer',
handler:function(){
$('#add_w').window('open');
}
},'-',
{
id:'btncut',
text:'删除用户',
iconCls:'icon-removeuser',
handler:function(){
$.messager.confirm('确认','确认删除?',function(row){
if(row){
var selectedRow = $('#test').datagrid('getSelections'); //获取选中行
var userIds = [];
for(var i=0;i<selectedRow.length;i++){
userIds.push(selectedRow[i].userId);
}
$.ajax({
url:"deleteMoreUser.action",
type:"post",
cache:false,
data:"userId="+userIds,
success:function(){
$.messager.alert('删除用户','删除用户成功!');
getData();
}
});
}
})
}
},'-[color=red]',{
id:'search',
text:'搜索',
iconCls:'icon-search',
handler:function(){
alert('cut')
}[/color]
}
]
}).datagrid('loadData',userData);
请问我如何在toolbar上加一个供用户输入查询条件的输入框啊????急啊!!!!