0

我的网站上有这段代码:

<div id="cse" style="width: 100%;">Loading</div>
            <script src="//www.google.com/jsapi" type="text/javascript"></script>
            <script type="text/javascript"> 
              google.load('search', '1', {language : 'it'});
              google.setOnLoadCallback(function() {
                var customSearchControl = new google.search.CustomSearchControl('mybigbigbignumber');
                customSearchControl.setResultSetSize(google.search.Search.LARGE_RESULTSET);
                customSearchControl.draw('cse');
              }, true);
            </script>
            <link rel="stylesheet" href="//www.google.com/cse/style/look/default.css" type="text/css" />

它按预期工作:出现谷歌搜索栏,搜索结果出现在下框中。

我需要的是一个“透明”的搜索动作。

我的意思是在我的表单中将搜索词传递给 google WebSearch 服务,并在我制作的自定义 css 化列表中显示结果。

4

1 回答 1

0

我最终使用了一些 jQuery 来隐藏 Google 标准表单并触发它的提交。

于 2011-11-18T13:49:14.583 回答