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');
    }

  • 相关阅读:
    css相关
    文章管理列表
    高性能MySQL基础篇
    mysql
    node.js开发实战
    React Hooks
    client-*,scroll-*,offset-*的区别
    将create-react-app从javascript迁移到typescript
    为Github项目添加Travis持续集成服务
    cookie储存
  • 原文地址:https://www.cnblogs.com/mabelstyle/p/3796260.html
Copyright © 2011-2022 走看看