1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
| var options = { url:'{:url('Company/add')}', type:'post', dataType:'json', beforeSubmit:function(arr,$from,options){ for(var i=0;i<arr.length;i++){} }, success: function(data,statusText){ if(data.state==1){} }, error: function(data){console.log(data.message);} }; $('form').submit(function() { $(this).ajaxSubmit(options); return false; });
|