相关疑难解决方法(0)

如何在Asp.net中使用javascript检测IE 11

您好我想检测浏览器,IE 8或更多将适合我.为此,我使用了以下代码,但IE11失败了.对于其他正确的检测.

function getInternetExplorerVersion()
{
    var rv = -1; // Return value assumes failure.
    if (navigator.appName == 'Microsoft Internet Explorer') {
        var ua = navigator.userAgent;
        var re = new RegExp("MSIE ([0-9]{1,}[\.0-9]{0,})");
        if (re.exec(ua) != null)
            rv = parseFloat(RegExp.$1);
    }
    return rv;
}
Run Code Online (Sandbox Code Playgroud)

以下是我尝试但无法成功的链接.

javascript asp.net internet-explorer browser-detection internet-explorer-11

17
推荐指数
5
解决办法
4万
查看次数

如何检测Internet Explorer 11及更低版本?

我想知道如何检测我的网站用户是否使用Internet Explorer 11或更低版本的Javascript.

它应该兼容并适用于所有这些版本.

怎么实现呢?

javascript internet-explorer

9
推荐指数
3
解决办法
1万
查看次数

是否可以使用Javascript检测所有版本的IE?怎么样?

对Web开发很新,请耐心等待.

我想检查浏览器使用的是IE(所有版本).

如果检测到IE,我需要更改CSS.

请指出正确的方向.

javascript internet-explorer

7
推荐指数
1
解决办法
5001
查看次数

如何禁用IE 10中的图像边框

如何禁用我的图像边界线以及Internet Explorer 10中标记中的图像?我试过了:

 a {
outline : none;
text-decoration: none;
 }
 a img {
 border : 0;
outline : none;
 }
 img {
border : 0;
border-style: none;
 }
Run Code Online (Sandbox Code Playgroud)

还有这个:

 <meta http-equiv="x-ua-compatible" content="IE=edge" />
Run Code Online (Sandbox Code Playgroud)

还有这个:

 <meta http-equiv="X-UA-Compatible" content="IE=EmulateIE9">
Run Code Online (Sandbox Code Playgroud)

什么都行不通.我的想法已经不多了.有人能帮帮我吗?

编辑:这是我的HTML和CSS文件:

 <!doctype html>
 <html>
 <head>
    <meta charset="utf-8" />

<title> Title </title>
<link rel="stylesheet" href ="main.css" />
<link rel="stylesheet" href ="menu.css" />

 </head>

 <body>

 <div class = "page " align ="center">
    <div class="header">
                <img id="bannerimg">
                <img id="menubar">
    </div>

    <div class="menu">
        <table id="menubtns" …
Run Code Online (Sandbox Code Playgroud)

html css css3 internet-explorer-10

6
推荐指数
1
解决办法
7277
查看次数

如何使用JS检查IE11是否在兼容性视图中

我想检查当前域是否启用了IE11兼容性视图。可以通过以下方式设置兼容性视图:工具>兼容性视图设置。

我知道几年前就已经提出过这个问题,但是由于IE11的最新更新,答案似乎不再起作用

有谁知道替代方法吗?

javascript compatibility internet-explorer-11

5
推荐指数
1
解决办法
3496
查看次数

如何将Internet Explorer用户重定向到新页面?

我尝试使用以下脚本

[if IE]
<script type="text/javascript">
window.location = "error.html";
</script>
[endif]
Run Code Online (Sandbox Code Playgroud)

除了其他浏览器(例如Chrome)也重定向到error.html页面之外,它的工作方式就像对待。怎么了 谢谢

html javascript css internet-explorer redirect

1
推荐指数
1
解决办法
4414
查看次数

如何将IE11重定向到其他网站

我有疑问.

我必须将IE用户重定向到其他网站,从IE6到IE9这个代码工作得非常好.

<!--[if IE]><script type="text/javascript">window.location = "google.com";</script><![endif]-->
Run Code Online (Sandbox Code Playgroud)

这段代码对IE 10非常有用

<script type="text/javascript">if (navigator.appName == 'Microsoft Internet Explorer'){self.location = "google.com"}</script>
Run Code Online (Sandbox Code Playgroud)

但是我找不到IE11的任何解决方案 - 在这个浏览器中我的网站没有重定向.

我真的在寻找更多时间这个解决方案,但我找不到任何想法.

也许您知道如何只编写一个脚本来将所有IE浏览器重定向到其他网站?

非常感谢!

html javascript jquery internet-explorer redirect

0
推荐指数
1
解决办法
2698
查看次数