Google的jsapi - google在IE中是未定义的错误 [英] Google's jsapi - google is undefined error in IE only
问题描述
我使用Google的 jsapi
绘制图表。我的图表在我使用FireFox查看我的页面时工作,但在IE中我在控制台中出现以下错误: google'is undefined
这就是我的代码在头部中的样子我的HTML文档的code>标记:
$ b
< script type =text / javascriptsrc =http://www.google.com/jsapi>< / script>
< script type =text / javascript>
google.load(visualization,1,{packages:[corechart]});
< / script>
但它在 google.load
我能找到的唯一解决方案是将URL协议从 http
更改为 HTTPS
。我的网站没有使用 https
其他地方。我仍然尝试使用它为 jsapi
,但该错误一直在IE中显示出来。 div>
如果在新的Internet Explorer中加载 https://www.google.com/jsapi 标签为您提供有关TLS的错误消息,您需要启用它。
好消息是它只影响你的电脑。坏消息是修复程序是客户端,您无法为网站访问者启用TLS。
I'm using Google's jsapi
to draw charts. My charts work when I view my page with FireFox, but in IE I get the following error in my console:
SCRIPT5009: 'google' is undefined
This is how my code looks in the head
tag of my HTML document:
<script type="text/javascript" src="http://www.google.com/jsapi"></script>
<script type="text/javascript">
google.load("visualization", "1", {packages:["corechart"]});
</script>
But it fails on the google.load
call.
The only "solution" I could find was changing the URL protocol from http
to https
. My site isn't using https
other places. I tried using it anyway for jsapi
, but that error kept showing up in IE.
If loading https://www.google.com/jsapi in a new Internet Explorer tab gives you an error message about TLS, you need to enable it.
The good news is that it only affected your computer. The bad news is that the fix is client-side and you can't enable TLS for your site's visitors.
这篇关于Google的jsapi - google在IE中是未定义的错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!