其他分享
首页 > 其他分享> > JScript:如何将焦点放在弹出窗口上

JScript:如何将焦点放在弹出窗口上

作者:互联网

我这样做了一个新窗口:

var WSHShell = WScript.CreateObject("WScript.Shell");
WSHShell.Popup("This is popup.");

但窗口出现在另一个窗口下.我怎么能把它移到前面?

解决方法:

也许这会有所帮助:

WScript.Shell.Popup has an
undocumented value for the nType
parameter which causes the resulting
dialogs/popups to “stay on top” / in
foreground, meaning that they cannot
be hidden by other windows or dialogs:
4096.

WScript.CreateObject("WScript.Shell").Popup("Message", 0, "Title", 4096);

标签:wsh,javascript,popup,window
来源: https://codeday.me/bug/20190827/1741592.html