如何限制我的asp.net应用程序,它应该只在IE中运行,不应该运行IE> 8? [英] How to restrict my asp.net application which should run only in IE and should not run IE > 8?

查看:93
本文介绍了如何限制我的asp.net应用程序,它应该只在IE中运行,不应该运行IE> 8?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,我有一个仅在IE< = 8上运行的应用程序。我不知道如何编写这个应用程序来管理这种情况。如何找到代码以及它将如何以及如何将模式更改为在所有浏览器中工作?



先谢谢。

Hi all,i have an application which runs only on IE <= 8.I dont know how this application is coded to manage this situation.How to find the code and how it will be and how to change the mode to work in all browsers?

Thanks in Advance.

推荐答案

您可以使用法定评论和javascript就是这样做的。

下面的内容应该有效 -

You can make use of coditional comments and javascript to do that.
Something like following should work-
<!doctype html>
<!--[if (gt IE 8)|!(IE)]> <html class="not_supported"> <![endif]-->
<!--[if (lt IE 8)|(IE 8)]><!--> <html class=""> <!--<![endif]-->
<head>



Javascript:


Javascript:

(function (


){
use strict;

if


'' html')。是(' not_supported')){
alert( 不支持此浏览器版本);
window location .href = ' http://www.google.com';
}
}(jQuery));
('html').is('not_supported')) { alert("This browser version is not supported"); window.location.href = 'http://www.google.com'; } }(jQuery));





希望,它有帮助:)

让我知道它是否无效。



参考:

http://stackoverflow.com/a/10965091/1006297 [ ^ ]


这篇关于如何限制我的asp.net应用程序,它应该只在IE中运行,不应该运行IE&gt; 8?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆