嘿,我已经签署了谷歌的自定义搜索和它的合理运作良好。

因此,基本上它生成的Javascript代码为我使用。

我想知道如何可以通过我还从查询字符串接受的值得到它的工作?

干杯

有帮助吗?

解决方案

我用下面vb.net代码来实现这一点:

google.load('search', '1', { language: 'en' });
google.setOnLoadCallback(function () {
        var customSearchControl = new google.search.CustomSearchControl('[your se code here]');
        customSearchControl.setResultSetSize(google.search.Search.FILTERED_CSE_RESULTSET);
        customSearchControl.draw('cse');
        customSearchControl.execute('<%=server.htmlencode(request.querystring("searchterm"))%>');
     }, true);
许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top