zoukankan      html  css  js  c++  java
  • [转]iframe异步加载

    (function(d) {
        var iframe = d.body.appendChild(d.createElement('iframe')),
        doc = iframe.contentWindow.document;
     
        // style the iframe with some CSS
        iframe.style.cssText = "position:absolute;200px;height:100px;left:0px;";
     
        doc.open().write('<body onload="' + 'var d = document;d.getElementsByTagName(\'head\')[0].' + 'appendChild(d.createElement(\'script\')).src' + '=\'\/path\/to\/file\'">');
     
        doc.close(); //iframe onload event happens
    })(document);
    

      

    http://www.cnblogs.com/beiyuu/archive/2011/07/18/iframe-tech-performance.html

  • 相关阅读:
    SPOJ NDIV
    SPOJ ETF
    SPOJ DIVSUM
    头文件--持续更新
    SPOJ FRQPRIME
    SPOJ FUNPROB
    SPOJ HAMSTER1
    观光
    最短路计数
    拯救大兵瑞恩
  • 原文地址:https://www.cnblogs.com/code/p/2958981.html
Copyright © 2011-2022 走看看