jaxa异步删除

 

  
  
  
  
  1. //删除 
  2. function del(id){ 
  3.     $.messager.confirm('提示''您确认要删除吗?'function(val) { 
  4.         if (val) { 
  5.             if(id){ 
  6.                 ZBXTools.showProcess("正在处理,请稍后。。。"); 
  7.                 $.ajax({ 
  8.                   url: "${ctx}/cbeex/transagreement/trans-agreement!delete.action"
  9.                   type: 'POST'
  10.                   cache: false
  11.                   data: 'id='+id, 
  12.                   success: function(data){ 
  13.                     var result = jQuery.parseJSON(data); 
  14.                     ZBXTools.hideProcess(); 
  15.                     if(result.isok=='T'){ 
  16.                         $.messager.alert('提示'"删除成功"'info'); 
  17.                     }else
  18.                         $.messager.alert('提示'"删除失败"'error'); 
  19.                     } 
  20.                     $('#dataList').datagrid("load"); //为<table id="dataList"></table>查询easyUI列表
  21.                   } 
  22.                 }); 
  23.             } 
  24.         } 
  25.     }); 

你可能感兴趣的:(1)