转运中国邀请码批量验证


最近要海淘,听说转运中国不错,但是不开放注册,只能通过海淘贝、什么值得买等网站发的邀请码来进行注册。无奈狼多肉少,总也抢不到。邀请码如下图:

但有时候,他是文字的。于是有了下面的代码,方便我快速验证所有的邀请码。

function runCode(){
	    
	    var strCode = $('#tbCodes').val();
	    var codes = strCode.split('\n');
	    $.each(codes,function(i,code){
	    	
	    	var win = window.open(window.location.href,"_blank");
	    	win.addEventListener('load',function(){
	    	    console.log('loaded')
	    	    //debugger;
	    		$('#aspnetForm').find(':text,:password').each(function(i,n){
	    			var id = this.id;
	    			
	    			var val = $(this).val();
	    			if(id == 'code'){
	    				val = code;
	    			}
	    				
	    			
	    			win.$('#' + id).val(val);
	    		});
	    		
	    		
	    		win.$('#aspnetForm').get(0).submit();
	    		

	    		
	    		
	    	});
	    });
	    
	  
	}
	
	$(document.body).append('<textarea id="tbCodes"></textarea><input type="button" value="GO" onclick="runCode()"/>');

  界面如下:


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM