zoukankan      html  css  js  c++  java
  • iframe框架加载完成后执行函数

    var iframe = document.createElement("iframe");
    iframe.src = "http://www.baidu.com/";
    
    if (!/*@cc_on!@*/0) { //if not IE
        iframe.onload = function(){
            alert("框架加载完毕.");
        };
    } else {
        iframe.onreadystatechange = function(){
            if (iframe.readyState == "complete"){
                alert("框架加载完毕.");
            }
        };
    }
    
    document.body.appendChild(iframe);
    //方法二
    var iframe = document.createElement("iframe"); iframe.src = "http://www.baidu.com/"; if (iframe.attachEvent){ iframe.attachEvent("onload", function(){ alert("Local iframe is now loaded."); }); } else { iframe.onload = function(){ alert("Local iframe is now loaded."); }; } document.body.appendChild(iframe);
  • 相关阅读:
    Segment Routing之IPv6 SR概述
    ping6 connect: Invalid argument
    glance image-list
    SRv6技术研究和组网设计
    physical_interface_mappings
    bond
    srv6 tools---SRext
    srv6
    8月18号
    8月17号
  • 原文地址:https://www.cnblogs.com/supe/p/7345078.html
Copyright © 2011-2022 走看看