ajax 执行成功前,提示正在处理请稍后

xiaoxiao2021-02-28  90

<p style="text-align:right;color:red" id="tonerInfowarning"></p> $.ajax({ type:"post", url:'/fudaMes/pigmentInfo/deletePigmentInfo?id='+toner_id, beforeSend: function(){ $('#tonerInfowarning').text('正在处理,请稍后...'); }, success:function(data){ if(data =="success"){ new PNotify({ title: '删除成功', text: '色粉信息已删除', type: 'success', styling: 'bootstrap3' }); $('#datatable').DataTable().row('#tr'+toner_index).remove().draw( false ); }else if(data=="pigmentNotExist"){ new PNotify({ title: '删除失败', text: '色粉不存在', type: 'error', styling: 'bootstrap3' }); }else{ new PNotify({ title: '删除失败', text: '色粉信息删除失败', type: 'error', styling: 'bootstrap3' }); } $('#tonerInfowarning').text(''); } });
转载请注明原文地址: https://www.6miu.com/read-25508.html

最新回复(0)