Jump to content
彼岸论坛
欢迎抵达彼岸 彼岸花开 此处谁在 -彼岸论坛

[程序员] 爬虫(验证码+跳转下载限制)--求教


Recommended Posts

Posted
重要的两步一:校验验证码 二:js 跳转下载限制
刷新图片
校验跳转的下载请求
var hcno = '';
function download(){
$('.verifyCode').click();
$('#myModal').modal('show');
}

function checkCode(){
var winRef = window.open("url","_blank");
$.ajax({
url:'verifyCode',
data:{'verifyCode':$('#verifyCode').val()},
method:'post',
dataType:"text",
error:function(data){
winRef.close();
alert("服务器出错,请联系管理员");
},
success:function(data){
if(data=='success'){
winRef.location = "viewGb?hcno=" + hcno;
$('#myModal').modal('hide');
}else {
winRef.close();
alert("验证码不正确,请重新输入");
$('#verifyCode').val('')
$('.verifyCode').click();
}
}
});
}
  • 游客注册

    游客注册

  • Members

    No members to show

  • Recent Status Updates

    No Recent Status Updates
  • Recently Browsing

    • No registered users viewing this page.
×
×
  • Create New...