【问题标题】:internet explorer gives out: "object doesn't support this property"Internet Explorer 给出:“对象不支持此属性”
【发布时间】:2011-11-09 17:10:12
【问题描述】:

我有以下内容,它基本上将数据从变量“href”动态加载到指定的 div 容器中。

setTimeout(function() {
      $.get(href, function(source) {
        var html = $(source);
        content = html.find("#content").html();
        $("#content").html(content);
        $("#content").animate({marginLeft: "0px"}, 1000);
        $("#ajax-loader").fadeOut(150);
    });
      }, 500);

在 Firefox、Chrome 等上完美运行,但似乎不适用于 IE 8。

有什么想法吗?

【问题讨论】:

  • var html=$(source) 这一行在做什么?
  • 从 get 请求中获取响应(因此它从 html 页面中生成一个 jquery 对象)

标签: jquery ajax internet-explorer


【解决方案1】:

这意味着对象上使用的方法之一不存在。您是否尝试过逐条注释规则以确定错误发生在哪条规则上?

【讨论】:

  • 我认为 IE 有一个很好的调试器来单步调试代码。
猜你喜欢
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2019-03-31
  • 2013-12-04
相关资源
最近更新 更多