iframe加载两次的问题


$(function(){
    var iframe = document.createElement("iframe");
    var height = document.documentElement.clientHeight - 100;
    iframe.height = height;
    iframe.name = "iframe";
    iframe.id = "iframe";
    
    iframe.width = "100%";
    iframe.frameborder = "0";
    document.getElementById("iframeDiv").appendChild(iframe);
    
    setTimeout(function(){
        iframe.src = "home.html";
    },300);
    
    /* var $iframe = '