Internet Explorer中不使用window.frames函数调用

时间:2019-06-13 10:26:56

标签: jquery typescript angular5

我想使用 window.frames 从另一个屏幕调用javascript函数,但是代码在chrome,mozila中可以正确运行,但在Internet Explorer中无法运行

    //Typescript Function
    async AddQweGoogle() 
    {
    var ifrm = document.createElement("iframe");
    ifrm.setAttribute("src", "/GoogleAddQwe/Index");
    ifrm.setAttribute("name", "frameName");
    ifrm.style.width = "0px";
    ifrm.style.height = "0px";
    if (document.getElementsByName('frameName').length == 0) {
        document.body.appendChild(ifrm);
    }
    var practiceData = this.practiceData_clientSide;
    var s = window.frames['frameName'].qwe();
    }

我从Typescript函数中的 GoogleAddQwe / Index 调用Javascript函数qwe(),但是该代码不仅在Internet Explorere中不起作用

0 个答案:

没有答案