简体   繁体   中英

Opening window in Edge from the page in IE on Windows 10

I have a web page in IE and a button that opens another page in the new window. The group policy specifies that the URL for the new page should be opened in Edge but when I click on the button it still opens the window in IE. If however I try to open that page from the link in Word document then it does open in Edge.

According to a tester in my firm this used to work. Apparently he was able to use the button in IE and open the page in Edge.

My knowledge of Javascript suggests that this should not be possible. Anybody disagrees?

Thanks,

Goran

-I tried opening the new URL from Word and it opened in Edge

-I tried opening the new URL from a simple HTML page that only has a button and it opens it in IE.

Here is the code for the simple HTML page:

<html>
    <body>
        <input type="button" value="Open" ONCLICK="window.open('[URL comes here]', '_blank', 'height=600,width=800');">
    </body>
</html>

Expectations were that the page should open in Edge, but it opens in IE which I suspect is right.

Edge registers the protocol "microsoft-edge". So you can open a webpage in Edge by specifiying this protocol before the actual url.

Using a static link:

<a href="microsoft-edge:http://www.google.com">Test</a>

Or from javascript

function test()
{
  location.href = 'microsoft-edge:http://www.google.com';
}

Obviously, you cannot specify a window name or dimensions of a popup window this way.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM