ajax同步验证单号是否存在的方法

//保存前执行的方法,ajax同步调用后台验证包裹单号是否存在 function doBeforeSave(){ var packageCode=document.getElementById("packageCode").Value; var temp=false; if(packageCode!=""){ $.ajax({ url: "${ctx}/finance/packageManagement!parcelsWhetherExists.do", //接收页面 type: 'post', //POST方式发送数据 async: false, //ajax同步 data:{packageCode:packageCode}, success: function(result) { temp = eval(result.result); } }); } if(!temp){ alert("包裹单号已存在!"); toft.resetForm("addDataForm");//清空表单 toft.id("packageCode").focus(); } return temp; }

内容版权声明:除非注明,否则皆为本站原创文章。

转载注明出处:https://www.heiqu.com/wjpjfd.html