1、页面A是我控制的。假设是www.000.com/aaa.html(php环境)
2、我要在页面A调用一个其他网站的页面B(www.bbb.com/bbb.html),页面B我无法控制,如果是浏览器访问,页面B自动跳转到页面C,如果是源代码访问则不跳转,这段验证是一段JS验证。
假设页面B的验证原理如下:<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
</head>
<body>
<script type='text/javascript'>
function htmlspecialchars(str){  
    str = str.replace(/</g, '&lt;');
    str = str.replace(/>/g, '&gt;');
    str = str.replace(/"/g, '&quot;');
    str = str.replace(/'/g, '&#039;');
    return str;
}function bol(){
    if (top.location != self.location) {
        return false;
    }    var qs = location.search.split("?")[location.search.split("?").length-1].split("&");
    qso = {};
    for (var i=0; i<qs.length; i++){
        if (qs[i]!="") {
            var tmpa = qs[i].split("=");
            qso[tmpa[0]] = tmpa[1] ? tmpa[1] : "";
        }
    }
    
    var tu = unescape(qso.tu);
    if (htmlspecialchars(tu).length != tu.length) {
        exit;
    }
    
    if (qso.tu && (qso.tu.indexOf("http%3A%2F%2Fs.click.taobao.com%2F")===0
                || qso.tu.indexOf("http%3A%2F%2Fi.click.taobao.com%2F")===0
                || qso.tu.indexOf("http%3A%2F%2Fs.click.alimama.com%2F")===0
                || qso.tu.indexOf("http%3A%2F%2Fitem8.taobao.com%2F")===0
                || qso.tu.indexOf("http%3A%2F%2Fshop8.taobao.com%2F")===0)) {
        if (!window.attachEvent) {
            document.write('<input style="display:none" type="button" id="exe" value="" onclick="window.location=\''+unescape(qso.tu)+'\'">');
            document.getElementById('exe').click();
        } else {
            document.write('<a style="display:none" href="'+unescape(qso.tu)+'" id="exe"></a>');
            document.getElementById('exe').click();
        }
    }
}//end of bol()
bol();
</script>
body>
</html>3、我要实现的就是用页面A调用页面B,但是页面A的页面B页面要自动跳转成页面C,或者说有没有办法绕过验证。4、我的页面A应该怎么写,才能实现这样的结果,最好是给我详细代码(一定是在页面A调用页面B,而不是调用页面C)。

解决方案 »

  1.   

    A调用B  B跳刀C??  登陆等待页面吗?  window.setInterval(function() 

    go_to("c"); 
    },3000); 

    不太清楚具体问题 延迟跳转行不
      

  2.   


    我要调用B  我不要直接调用C  我就是要模拟真实的  从B跳转到C的事件
      

  3.   

    是啊  我懂啊
    A页面  
    window.location = "B.jsp";
    在B的加载写
     window.setInterval(function() 

    go_to("c"); 
    },3000); 
    }  <body onload="" ></body>
    就是A跳转到B  B页面等待3秒跳转到C ··是我理解有问题吗?
      

  4.   

    没戏,加了放置iframe的代码了
        if (top.location != self.location) {
            return false;
        }
    firefox12测试了下没法定义location