0

嘿,我已经注册了谷歌自定义搜索,并且它的工作相当好。

所以基本上它生成了一个 Javascript 代码供我使用。

我想知道如何通过接受来自 querystring 的值来使其工作?

干杯

4

1 回答 1

0

我使用以下 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);
于 2011-01-25T10:30:45.537 回答