开发者社区> 问答> 正文

js调用出错,firebug的控制台一直加载js文件? 400 报错

js调用出错,firebug的控制台一直加载js文件? 400 报错

按钮的代码:

<a id="delSub" class="5i5j-toolbarbutton ajaxbutton" plain="true" icon="toolbar-icon-delete" onClick="CrmProject.batchDeleteProjectemployee('tt','crmProject.batchDelEmployee.b5','${crmProjectId}')">删除</a>

 执行的方法:

batchDeleteProjectemployee:function(tableId,url,crmProjectId){
  var rows = $("#"+tableId).datagrid('getSelections');
  var temp = "";
  if(rows.length == 0 || rows==""){
   $.messager.alert('警告','请选择要删除的员工!','warning');
   return;
  } 

  for(var i=0;i<rows.length;i++){
   temp += "empIds="+rows[i].empId+"&";
  }
  url += "?id="+crmProjectId;

  Common.batchDelete(tableId,temp,url);
  }

另一个js中的方法

//批量删除
 batchDelete:function(tableId,bystring,url){
  if(bystring.length == 0 || bystring==""){
   $.messager.alert('警告','请选择要删除的数据项!','warning');
   return;
  }
  $.messager.confirm('确认批量删除', '确定要删除已经选择的记录吗?', function(r){
   if (r){
    //大家的操作可以放在这里
    $.ajax({url:url,data:bystring,dataType:"json",async: false,type:"POST",beforeSend : function(){
     Utils.showProcessingMessage($(document.body));
    }, success:function(json){
          Utils.hideProcessingMessage();
          if(json.status == "0"){
      Utils.autoHideMessage($(document.body),"批量删除数据失败,请重试!");
     }else if(json.status == "1"){
     }else if(json.status == 2){
      $.messager.alert('警告','您没有访问此功能的权限,请与管理员联系!','warning');
     }
        Common.reload(tableId);     
    }, error:function(html){
     Utils.hideProcessingMessage();
     $.messager.alert('错误','批量删除数据失败,请重试!','error');
    }});
   }
  });

这是涉及到的代码,点击删除的按钮后首先没有任何反应,而是出现下面的界面。然后是js的调用,请问这是什么原因?

 

展开
收起
爱吃鱼的程序员 2020-06-02 16:54:04 683 0
1 条回答
写回答
取消 提交回答
  • https://developer.aliyun.com/profile/5yerqm5bn5yqg?spm=a2c6h.12873639.0.0.6eae304abcjaIB

    问题已经解决,是按钮的问题,将class="5i5j-toolbarbutton ajaxbutton"改为class="5i5j-toolbarbutton",搞定,感谢大家的关注。只是小弟不才,不知道为什么会是这个原因,望各位大侠多多赐教

    ######

    介绍一个可以学习JQuery UI、JQuery Liger 、DWZ、JQuery EasyUI的网站
    前端技术交流论坛www.jqueryuibbs.com包含了上述技术
    web流程设计器1下载 http://www.jqueryuibbs.com/thread-126-1-1.html
    web流程设计器2下载 http://www.jqueryuibbs.com/thread-129-1-1.html
    easy-ui皮肤切换功能http://www.jqueryuibbs.com/thread-124-1-1.html
    easy-ui仓库管理系统http://www.jqueryuibbs.com/forum.php?

    mod=viewthread&tid=143&extra=
    ligerUI布局实例http://www.jqueryuibbs.com/thread-14-1-1.html
    dwz局部表格分页http://www.jqueryuibbs.com/thread-45-1-1.html
    实用OA系统左侧DIV+CSS菜单源码(漂亮OA界面菜单源码下载)

    http://www.jqueryuibbs.com/thread-194-1-1.html
    绿色的Flash翻书特效(有声音) http://www.jqueryuibbs.com/forum.php?

    mod=viewthread&tid=216&page=1&extra=#pid365
    WEB开发者应该收藏的工具网站http://www.jqueryuibbs.com/thread-218-1-

    1.html

    2020-06-02 16:54:22
    赞同 展开评论 打赏
问答排行榜
最热
最新

相关电子书

更多
JavaScript异步编程 立即下载
Delivering Javascript to World 立即下载
编程语言如何演化-以JS的private为例 立即下载