javascript - jqplot 与 IE8 不工作

标签 javascript jquery internet-explorer-8 jqplot

当我尝试在 IE8 下使用 jqplot 初始化图表时,出现 js 错误。

错误位于:

return window.G_vmlCanvasManager.initElement(P)

在 jquery.jqplot.min.js 文件中。

错误是关于:“属性 initElement 未定义或为 null”

我该如何解决这个问题?

此外,同样的错误出现在official site处。 jqplot 的。

我正在使用 IE11 和 IE8 模拟器模式。 IE>8 => 没有问题。

最佳答案

您是否包含了excanvas

From their site :

Note, excanvas is required only for IE versions below 9. IE 9 includes native support for the canvas element and does not require excanvas

Note, if you are using IE10+ and are emulation IE8, conditional comments does not work.

所以而不是

<!--[if lt IE 9]><script language="javascript" type="text/javascript" src="excanvas.js"></script><![endif]-->

尝试一下

<script language="javascript" type="text/javascript" src="excanvas.js"></script>

如果可以的话,它应该可以在真正的 IE8 中工作。您可以保留条件注释或使用功能检测来包含 excanvas.js

关于javascript - jqplot 与 IE8 不工作,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/22685608/

相关文章:

javascript - 如何使用 jQuery 过滤对象数组

css - 仅在网络应用程序的本地副本中样式困惑 - IE8

javascript - Angular 日期选择器的行为完全不符合预期

javascript - .on ('click' ) 有效, .css ('display' ,'block' ) 有效,但不在一起

Javascript 加载图标无法在浏览器上禁用 JS 的情况下使用

jquery - 如何在单独的 div 标签中淡出全屏多背景图像

javascript - 为什么我的整个 Ubuntu 系统会因为 Firefox 中有问题的 javascript 代码而卡住?

javascript - 如何通过使用 jquery 单击更改音频 src?

html - CSS 背景源在 IE8 + Vista 中获取 'flashy'

internet-explorer - Angular JS ng-style 和 Internet Explorer 8