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,
reccount:10,
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($year,$projectCode)
,我该怎么做?