在ie8浏览器中使用jquery-2.0.3:object不支持此属性或方法 [英] using jquery-2.0.3 in ie8 browser : object doesn't support this property or method

查看:130
本文介绍了在ie8浏览器中使用jquery-2.0.3:object不支持此属性或方法的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用了jquery。它在Firefox中运行良好。但是当我通过ie8打开它时得到同样的错误:
object dos not suport this property or method。 834行
我禁用此行并在此行中找到相同的错误:836,3316,...

I used jquery. It work fine in firefox. But when I open it by ie8 get same error : object dosn't suport this property or method . line 834 I disable this line and find same errors in this lines: 836,3316,...

我制作示例代码并测试,它不显示我的提醒永远不会:

I make sample code and test ,It not show my alerts never:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head id="Head1" runat="server">
<script type="text/javascript" src="jscripts/jquery-2.0.3.js"></script>
<script type="text/javascript" >

    var isIE8 = $.browser.msie && +$.browser.version === 8;
var isIE8 = $.browser.msie && +$.browser.version === 8;
if ( isIE8 ) {
alert("ie8");}


alert("test");
...

大家可以帮帮我吗?
谢谢!

Can everyone help me? Thank you!

推荐答案

如评论中所述,jQuery 2.x不支持Internet Explorer 6, 7或8

As noted in the comments, jQuery 2.x " does not support Internet Explorer 6, 7, or 8"

来自 http:/ /api.jquery.com/jQuery.browser/


此属性已在jQuery 1.9中删除,只能通过jQuery.migrate插件。请尝试使用功能检测。

This property was removed in jQuery 1.9 and is available only through the jQuery.migrate plugin. Please try to use feature detection instead.

这篇关于在ie8浏览器中使用jquery-2.0.3:object不支持此属性或方法的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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