js 将“a,b”转换成int数组

var status = $('#orderStatus').val();
     if(status){
         status = status.split(",");
         status.forEach(function(data,index,arr){
         this[index] = (+data);
         }, status);
     }

猜你喜欢

转载自blog.csdn.net/qq_38623459/article/details/79569241