您的位置:首页 > Web前端 > JQuery

jquery easyui datagrid 动态改变url地址中的参数值

2011-07-25 14:10 381 查看
方法一:(改变后加载当前页面内容)

//第一次设定

$('#telGrid').datagrid({

url:'p_n_list.php?act=getAjax_list&s_key=400电话
&website=http://www.my400800.cn

',

nowrap: false,

striped: true,

collapsible:true,

pagination:true,

rownumbers:true,

pagination:true,

toolbar:[{

text:'新增',

iconCls:'icon-add',

handler:function(){

//$('#btnsave').linkbutton('enable');

//alert('add')

addRow();

}

},'-',{

text:'修改'

,

handler:function(){

updateRow();

}

},'-',{

text:'删除',

iconCls:'icon-remove',

handler:function(){

getSelections();

}

},'-',{

text:'查询',

iconCls:'icon-search'

,

handler:function(){

$('#searchW').window({

title: '设定查询条件',

width: 300,

modal: true,

shadow: false,

closed: false,

height: 200,

close:function(){

alert('data');

}

});

}

}]

});

$('#telGrid').datagrid('reload', {

s_key
:800电话

});

方法2:

$
('#telGrid').datagrid({url:'http://www.my400800.cn',
queryParams:{s_key:'400',  website:'http://www.my400800.cn/LianXiWoMen.html' }
})
;
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: