jqgrid怎样传递参数???
jQuery(function(){varyear=jQuery("#historyQuery").val();varprojectCode=jQuery("#proje...
jQuery(function(){
var year=jQuery("#historyQuery").val();
var projectCode =jQuery("#projectCode").val();
jQuery("#list").jqGrid({
hidegrid:false,
height:300,
pgbuttons:false,
pginput:false,
url:'index.php?option=com_projectdetails&view=details&task=ajaxdetails.getProjectDetails&format=xml',
// editurl:'index.php?option=com_cwmaintain&view=incharge&task=ajaxincharge.editcwmaintain&format=xml',
datatype: 'xml',
mtype: 'post',
colNames:['日期','凭证号','摘要','收入/拨出','支出/拨出','借还款'],
colModel :[
{name:'N3', index:'N3', width:110,sortable:false,editable:false},
{name:'N4', index:'N4', width:110,sortable:false,editable:true,editrules:{required:true}},
{name:'N5', index:'N5', width:110,sortable:false,editable:true,editrules:{required:true}},
{name:'N7', index:'N7', width:110,sortable:false,editable:true,editrules:{required:true}},
{name:'N6', index:'N6', width:110,sortable:false,editable:true,editrules:{required:true}},
{name:'N6', index:'N6', width:110,sortable:false,editable:true,editrules:{required:true}},
],
rowNum:20,
viewrecords: true,
gridview: true,
pager: '#pager',
caption: '部门负责人'// jqgrid标题
});
jQuery("#list").navGrid('#pager',{edit:false,add:false,del:false,search:true,refresh:true}); // 菜单
});
我想把year和projectcode两个变量,作为参数传递到getProjectDetails函数中,怎样写呢? 展开
var year=jQuery("#historyQuery").val();
var projectCode =jQuery("#projectCode").val();
jQuery("#list").jqGrid({
hidegrid:false,
height:300,
pgbuttons:false,
pginput:false,
url:'index.php?option=com_projectdetails&view=details&task=ajaxdetails.getProjectDetails&format=xml',
// editurl:'index.php?option=com_cwmaintain&view=incharge&task=ajaxincharge.editcwmaintain&format=xml',
datatype: 'xml',
mtype: 'post',
colNames:['日期','凭证号','摘要','收入/拨出','支出/拨出','借还款'],
colModel :[
{name:'N3', index:'N3', width:110,sortable:false,editable:false},
{name:'N4', index:'N4', width:110,sortable:false,editable:true,editrules:{required:true}},
{name:'N5', index:'N5', width:110,sortable:false,editable:true,editrules:{required:true}},
{name:'N7', index:'N7', width:110,sortable:false,editable:true,editrules:{required:true}},
{name:'N6', index:'N6', width:110,sortable:false,editable:true,editrules:{required:true}},
{name:'N6', index:'N6', width:110,sortable:false,editable:true,editrules:{required:true}},
],
rowNum:20,
viewrecords: true,
gridview: true,
pager: '#pager',
caption: '部门负责人'// jqgrid标题
});
jQuery("#list").navGrid('#pager',{edit:false,add:false,del:false,search:true,refresh:true}); // 菜单
});
我想把year和projectcode两个变量,作为参数传递到getProjectDetails函数中,怎样写呢? 展开
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询