Feed on
Posts
Comments
Email訂閱

最近原本安裝的google custom search一直出現過度網路自動搜尋的問題,因此更動了一下程式碼如下:
原來的:

<form method=”get” action=”http://www.google.com.tw/custom” target=”google_window”>
<input type=”hidden” name=”domains” value=”donghong.info”></input>
<label for=”sbi” style=”display: none”>輸入您的搜尋字詞</label>
<input type=”text” name=”q” size=”17″ maxlength=”255″ value=”” id=”sbi”></input>
<label for=”sbb” style=”display: none”>提交搜尋表單</label>
<input type=”submit” name=”sa” value=”Google 搜尋” id=”sbb”></input>
<input type=”radio” name=”sitesearch” value=”donghong.info” checked id=”ss1″ style=”display:none”></input>
</form>

更新版

<form name=”cse” id=”searchbox_demo” action=”http://www.google.com/cse” target=”google_window”>
<input type=”hidden” name=”cref” value=””/>
<input type=”hidden” name=”ie” value=”big5″ />
<input type=”hidden” name=”hl” value=”zh-TW” />
<input name=”q” type=”text” size=”17″ />
<input type=”hidden” name=”cof” value=”GALT:#008000;GL:1;DIV:#336699;VLC:663399;AH:center;BGC:FFFFFF;LBGC:336699;ALC:0000FF;LC:0000FF;T:000000;GFNT:0000FF;GIMP:0000FF;LH:50;LW:200;L:../images/mark1.gif;S:http://living.donghong.info;FORID:1″></input>
<input type=”submit” name=”sa” value=”Google” />
</form>
<script type=”text/javascript” src=”http://www.google.com.tw/cse/tools/onthefly?form=searchbox_demo&lang=zh-Hant”></script>

注意:

  1. cref似乎要留著,不然在後續搜尋會有問題

 

留言區