是否可以在Google自定义搜索中添加指向页面结果的下一个和上一个链接?我找到了这个帖子How to show next/previous links in Google Custom Search Engine paging links但代码是旧版Google自定义搜索 .
较新的版本只为您提供了一个像 <gcse:searchresults-only></gcse:searchresults-only>
的标签,一切都是从那里生成的 . 有任何想法吗?谢谢
这就是搜索结果的结果 .
<script>
(function() {
var cx = 'xxxxxx:xxxxx',
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>
<gcse:searchresults-only></gcse:searchresults-only>
1 回答
您可以使用包含在
google.setOnLoadCallback
中的所有searcher.cursor.currentPageIndex
和searcher.gotoPage()