gpt4 book ai didi

javascript - Google Site Search 搜索按钮字形图标

转载 作者:行者123 更新时间:2023-11-28 05:18:49 25 4
gpt4 key购买 nike

他们是如何将搜索按钮文本修改为下面 jsfiddle 上的图标的?

我的页面上有完全相同的代码/标签(cx 参数除外),但搜索按钮文本显示“搜索”并且旁边有一个 X 图标。我还没有在 GSS 控制面板中找到任何允许对按钮进行此类修改的设置。

// Make sure in jsFiddle you have selected option onLoad.
(function() {
var cx = '017643444788069204610:4gvhea_mvga'; // Insert your own Custom Search Engine ID here
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);
})();
<div style="border: 1px solid blue;">
Area 1 (for example a sidebar)
<gcse:searchbox></gcse:searchbox>
</div>

<div style="border: 1px solid red;">
Area 2 (for example main area of the page)
<gcse:searchresults></gcse:searchresults>
</div>

最佳答案

去那里:https://support.google.com/customsearch/answer/4513783?hl=en然后单击“控制面板”链接。

进入后,添加您的网站,然后查看左侧网站并按照以下说明操作:

How to replace google custom search engine's magnifying glass with a button that says "search"?

关于javascript - Google Site Search 搜索按钮字形图标,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/39169834/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com