function Students_Save() { var z = /^[0-9]*$/; var strPreAddedValue = $("#PreIncreaseQty").val(); var orderQty = $("#OrderQty").val(); if (strPreAddedValue != undefined) { if (!z.test(strPreAddedValue)) { $.messager.alert("系统提示", "填写的数据格式应为正整数!"); return; } $(document.forms[0]).submit(); } else if (orderQty != undefined) { if (!z.test(orderQty)) { $.messager.alert("系统提示", "填写的数据格式应为正整数!"); return; } $(document.forms[0]).submit(); } }