当我尝试在 IE8 下使用 jqplot 初始化图表时,出现 js 错误。
错误位于:
return window.G_vmlCanvasManager.initElement(P)
在 jquery.jqplot.min.js 文件中。
错误是关于:“属性 initElement 未定义或为 null”
我该如何解决这个问题?
此外,同样的错误出现在official site处。 jqplot 的。
我正在使用 IE11 和 IE8 模拟器模式。 IE>8 => 没有问题。
最佳答案
您是否包含了excanvas
?
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/