index.html页面嵌入了登入页面zhuce.html嵌入的页面扫码登入成功后网页会出现 扫码成功 字样需要在index.html页面判断嵌入的页面 是否出现 扫码成功字样如果出现index.html就跳转到指定页面
菜鸟不懂球帮忙
index页面代码:<!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>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>扫码登录</title>
<style type="text/css">
<!--
body {
background-color: #FEDF08;
}
-->
</style></head>
<body>
<style> 
body{ text-align:center} 
.div{ margin:0 auto; width:380px; height:500px; } 
/* css注释:为了观察效果设置宽度 边框 高度等样式 */ 
</style> 
</head> 
<body> 
<div class="div"> 
<iframe width="100%" height="100%" src="http://vx.020136.com/app/index.php?i=1&c=entry&do=qc&m=cz_tk" frameborder="0"></iframe>
</div> 
</body>
</html>

解决方案 »

  1.   

    需要在index.html页面判断嵌入的页面 是否出现 扫码成功字样这样做不行应该在zhuce.html成功扫码后,调用index.html的事件做跳转。如果你是整页刷,可以直接在zhuce.html里面执行刷新
    使用
    window.top.location.href = 'xxxxx.html';
      

  2.   

    这个跳转没必要在index.html里进行控制,如果扫码成功,直接在zhuce.html里:top.location.href = 'xx.html';如果业务非得在index.html里控制,可以在index.html定义个变量,定时读取。比如:
    var  flag = 0;
    //定时读取
    if(flag == 1){
      //跳转
    }
    扫码成功,在zhuce.html改变index.html变量的值 flag=1;