form表单有条件的提交

form表单提交数据,比如,积分,score,在0--100之间

 1          var score = $('#score').val();
 2             if(score !=''){
 3                 if(isNaN(score)){
 4                     layer.msg("积分请输入整数类型!");
 5                     return false;
 6                 }
 7                 if(score<0 || score>100){
 8                     layer.msg("积分值请输入0到100以内的数字!");
 9                     return false;
10                 }
11             }
原文地址:https://www.cnblogs.com/wanlibingfeng/p/7133512.html