2
对于如何将Google的附加链接搜索框用于Google的自定义搜索,我完全沉迷其中。Google的自定义搜索附加链接搜索框
有人会知道我怎么开始连接2吗?
对于站点链接搜索框谷歌给下面的代码:
<script type="application/ld+json">
{
"@context": "http://schema.org",
"@type": "WebSite",
"url": "https://www.example-petstore.com/",
"potentialAction": {
"@type": "SearchAction",
"target": "https://query.example-petstore.com/search?q={search_term_string}",
"query-input": "required name=search_term_string"
}
}
</script>
然后你有谷歌的自定义搜索代码:
<script>
(function() {
var cx = '006674923042857018221:WMX2084923030';
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>
如何在地球上我连接2?希望你能指点我正确的方向。