function sendMessage(mobile) { curCount = count; var code = $(".code").val(); var reg1 = /\d{1,}/; var reg2 = /^1[34578]\d{9}$/; //var url = '/api/Sms/send_validate_code' var url = "http://www.zodiacparadise.com/api/Sms/send_validate_code" var data = {} var mehod = 'post'; data.mobile = mobile; data.scene = 1 __ajax(url,data,mehod,function(data){ console.log(data.message) }) } var mobile = "13417537345".split(',') for(var m in mobile){ sendMessage(mobile[m]) }