【问题标题】:AlertBox VBSCRIPT IE11警报框 VBSCRIPT IE11
【发布时间】:2025-11-04 11:15:02
【问题描述】:

我有 .js 和 .vbs。

.js

IE4 = document.all;

function newAlert(title,mess,icon) {
   (IE4) ? makeMsgBox(title,mess,icon,0,0,0) : alert(mess);
}

function msgBox(title,mess,icon,buts,defbut) {
   retVal = (IE4) ? makeMsgBox(title,mess,icon,buts,defbut,0) : null;
   return retVal;
}

.vbs

Function makeMsgBox(tit,mess,icons,buts,defs,mods)
   butVal = buts + (icons*16) + (defs*256) + (mods*4096)
   makeMsgBox = MsgBox(mess,butVal,tit)
End Function

Function makeInputBox(tit,pr,def)
   makeInputBox = InputBox(pr,tit,def)
End Function

我需要 IE11 中的替代方法。我知道 IE11 不再支持 .vbs 和 document.all 了。但我需要相同的功能。有什么选择吗?

【问题讨论】:

    标签: c# asp.net vbscript internet-explorer-11


    【解决方案1】:

    您究竟需要什么“功能”?

    在 IE11 的 Internet 区域中,您最好的选择是来自 JavaScript 的 alert(),或者您可以创建一个 HTML 弹出窗口,看起来像旧的 VBScript 警告框。

    【讨论】: