2
Google上次查看時更新了自定義搜索代碼。這是我們的工作代碼:Google自定義搜索 - 在查詢字符串上搜索
<script>
(function() {
var cx = '011561302208175438083:iegdgk3oox8';
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>
...
<gcse:search></gcse:search>
我們想知道的,是我們如何讓這個搜索框自動搜索時的值在頁面加載?