IE 在prototype.js 行中显示错误.1597 [英] IE display error in prototype.js line no. 1597

查看:43
本文介绍了IE 在prototype.js 行中显示错误.1597的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用prototype.js使用lightwindow,出现lightwindow时IE显示错误,我正在写出现问题的行,请告诉我错误在哪里以及如何纠正

i m using lightwindow using prototype.js, IE display error when lighwindow appear, i m writing lines where problem occur, please suggest me where is the error and how to rectifi it

setStyle: function(element, styles, camelized) {
    element = $(element);
    var elementStyle = element.style;

    for (var property in styles)
      if (property == 'opacity') element.setOpacity(styles[property])
      else
        elementStyle[(property == 'float' || property == 'cssFloat') ? // error show in this line
          (elementStyle.styleFloat === undefined ? 'cssFloat' : 'styleFloat') :
          (camelized ? property : property.camelize())] = styles[property];

    return element;
  },

推荐答案

prototype.js 代码很可能没问题,它可能是对不存在的元素的 setStyle() 调用.

The prototype.js code is most likely fine, it's probably a setStyle() call on an element that doesn't exist.

如果您使用 Internet Explorer 8,请按 F12 打开开发人员工具.切换到脚本"选项卡,然后找到堆栈跟踪.堆栈跟踪将向您显示进行违规 setStyle() 调用的位置.这可能已经给你一个提示wnat's wrong;如果没有,请返回该信息.

If you use Internet Explorer 8, press F12 to open the developer tools. Change to the "script" tab and then find the Stack Trace. The stack trace will show you the point where the offending setStyle() call was made. That might already give you a hint wnat's wrong; if it doesn't, come back with that info.

您可以对 Firefox 和 Firebug 执行相同的操作.

You can do the same with Firefox and Firebug.

这篇关于IE 在prototype.js 行中显示错误.1597的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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