zoukankan      html  css  js  c++  java
  • 在父页面和其iframe之间函数回调 父页面回调iframe里写的函数

    // @shaoyang  父页面
    window['mengBanLogin']={
    mengBanArr : new Array(),
    mengBanLoginSuccess : function(){
    console.log('mengbanzhixing');
    if(mengBanLogin.mengBanArr.length > 0){
    for(var i = mengBanLogin.mengBanArr.length-1; i >= 0; i--){
    mengBanLogin.mengBanArr[i]();
    }

    }
    }
    }
    jQuery("#mengban").click(function(){
    //if(!QQ.Cookie.get("skey")){
    if(QQ.Cookie.get("uin")==null){
    userLogin();
    window['login'].cbArr.push(mengBanLoginSuccess);
    }else{
    mengBanLoginSuccess();
    }
    function mengBanLoginSuccess(){
    window['mengBanLogin'].mengBanLoginSuccess();
    jQuery(this).hide();
    jQuery("#videobox").show();
    addCName(0);
    video.setVid(firstVid);
    jQuery("#shipinTitle li").eq(vnum-1).addClass("on").siblings().removeClass("on");
    }
    });

    //iframe里的

    //以下实现的功能是 视频播放器上有蒙板的页面
    if(typeof(parent['mengBanLogin'])!='undefined'){
    parent['mengBanLogin'].mengBanArr.push(mengBanLoginSuccess);
    }
    function mengBanLoginSuccess(){
    player.play();
    console.log('loghha');
    }

  • 相关阅读:
    使用Eclipse的坑
    约定优于配置
    Tomcat服务器使用和debug
    spring框架排错
    spring框架学习感悟
    Spring的标签和验证等模块
    11. Container With Most Water
    1367. Linked List in Binary Tree
    486. Predict the Winner
    205. Isomorphic Strings
  • 原文地址:https://www.cnblogs.com/mabelstyle/p/3796260.html
Copyright © 2011-2022 走看看