JqGrid自定义按钮不执行功能

JqGrid Custom Button Not Executing Function

本文关键字:执行 功能 按钮 自定义 JqGrid      更新时间:2023-09-26

所以我已经在JqGrid表的分页中添加了一个自定义按钮。我试图通过向onClick参数添加一个简单的警报("hello")函数来测试它,如下所示:

jQuery("#jsonmap").jqGrid('navGrid','#pjmap',{edit:false,add:false,del:false,refresh:true}).
                jqGrid('navButtonAdd',"#pjmap",{caption:"Export to Excel",buttonicon:"", onclickButton: function(){ 
      alert("Hello");
   }, position:"last",title:"",cursor:"pointer"});

按钮在网页上生成时正确显示在JqGRid上,但是当我点击它时什么都没有发生,没有警报什么都没有。

提前感谢您的建议

使用onClickButton,它应该是驼峰字体