使用internet explorer 11单击href链接时出错

Error when I click on href link with internet explorer 11

本文关键字:链接 出错 href 单击 internet explorer 使用      更新时间:2023-09-26

我已经检查了这个链接在href ie 11中使用js时出错,但它并不能解决我的问题。

我的链接位于应用程序A上,当我单击链接时,我会向应用程序B发送信息:这是我在应用程序A:上的链接

<a target="_blank" href="javascript:displayInfinityPage({{userName}});">{{l10n "Data access"}}&nbsp;</a>

这是我的JavaScript函数:

//Posts the username back to Application B
function displayInfinityPage(username){
    window.opener.postMessage(username,"*");
}       

这就是我在应用程序B:上接收数据的方式

function onMessageApp(e) {
    if (e.data != "1") {
    var consumerPageSearchOpened = ((document.getElementById('DEBTOR_ID')) ? true:false);
    if (e.origin == "http://10.1.92.3:9090" && consumerPageSearchOpened) {
    document.getElementById("ID").value = e.data;
    document.getElementByName("subcommand").click();
    } else {
    alert("Application B is rejecting message from  "+e.origin+");
    }
    } else if (e.data == 1) {
    alert("Update status");
    command=collections.changeicstatus&i3_status=0
    var url = document.getElementById("curSession").value+'?command=collections.changeicstatus&i3_status=0';
    command=collections.changeicstatus&i3_status=0';
    window.location = url;
    window.opener.location.href = url;
        }
}
window.addEventListener("message",onMessageApp,true);

这是我得到的错误:

无法显示此页面。请确保网址//ieframe.dll/dnseror.htm#是正确的

应用程序A正在打开一个新的选项卡,地址栏中显示"javascript:displayInfinityPage({{147852}}(;",而不是在应用程序B中填充147852("ID"字段(

我也有同样的问题。错误是:无法显示此页面。请确保网址//ieframe.dll/dnseror.htm#正确无误。