简体   繁体   中英

How to do redirect to others browser from IE?

<!DOCTYPE html">
<html lang="en">
<head>
<meta charset="utf-8">
<title> Redirecting EWS Manager to Chrome </title>
<h1>Browser Redirecting ......</h1>
<script type="text/javascript">
{ varshell = new AciveXObject("WScript.Shell");
shell.run("Chrome //new Link here//");
window.location.replace("#old link the default browser"):}
setTimeot("pageRedirect()",3000);
</script>
</head?
</html>

Above code is for redirecting and named as redirect.html. But it only works when I open my website in IE so that it will redirect to Chrome. But If I open in Chrome, it will only shows Redirecting to Chrome. It does't work in Chrome, It only works in IE. Opening in IE and redirecting to Chrome is works. But reopening in Chrome doesn't work. May I know why and can you please show me a way to fix it?

echo "                  <tr><td class=\"left_padding\"><a class=info href=\"http://sgewsweb.amk.st.com:8080/web/system/usermgr7/redirect_edge.html\" >User Manager<span>EWS Administrator</span></a></td></tr>";

This link is from my default homepage. When I click to the tab, it opens in Chrome. Some says I have to do with onclick function but I have no idea how to use it. Can you please fix it for me?

enter image description here When I open Chrome, it pperars like this.

You can try redirecting through header location in php. It will work in all browsers. However, it needs to be placed before any html output.

<?php header('Location: newlink.php'); ?>

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