SCRIPT5009: 'google' 未定义 [英] SCRIPT5009: 'google' is undefined

查看:53
本文介绍了SCRIPT5009: 'google' 未定义的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

这是我第一次使用 wordpress,我使用的是 3.4.1 版本.由于我使用了 http://www.google.com/cse/,我的网站 http://www.unicos.cc 停止在 IE 上工作.它开始加载和加载,但是如果您查看脚本,则会收到此错误:

This is my first time working with wordpress and I'm using the version 3.4.1. Since I used http://www.google.com/cse/, my website http://www.unicos.cc stoped working on IE. It starts loading and loading, but if you take a look on scripts you get this error:

<script defer onreadystatechange='google.loader.domReady()' src=//:></script>

SCRIPT5009: 'google' is undefined 
www.unicos.cc, line 1 character 1

我在 header.php 上使用这个脚本:

I'm using this script on my header.php:

<script>
  (function() {
    var cx = '000262504839720845383:sqkphv1egay';
    var gcse = document.createElement('script'); gcse.type = 'text/javascript'; gcse.async = true;
    gcse.src = (document.location.protocol == 'https:' ? 'https:' : 'http:') +
        '//www.google.com/cse/cse.js?cx=' + cx;
    var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(gcse, s);
  })();
</script>

这段代码在我的页面-buscar.php(页面搜索)上调用函数:

And this code to call the function on my page-buscar.php (page-search):

<gcse:search></gcse:search>

你可以看看网站.我的代码在那里,等待你的帮助.我也是.

You can take a look at the website. My code is there, waiting for your help. And so am I.

感谢您的耐心等待!

推荐答案

您的网站在 IE 中仍然是空白的.

Your site is still blank in IE.

也许您应该将自定义搜索引擎切换到 V1:

Maybe you should switch your Custom search engine to V1:

http://www.google.com/cse/ >> 获取代码 >> "切换到搜索元素 V1 代码"

http://www.google.com/cse/ >> Get code >> "Switch to Search Element V1 code"

http://productforums.google.com/forum/#!topic/customsearch/ZIwVtE2i73E

这篇关于SCRIPT5009: 'google' 未定义的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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