วันศุกร์ที่ 22 ตุลาคม พ.ศ. 2553

google custom search modify


<div style="overflow:hidden;width:280px;">
<div id="searchForm" style="width: 240px;">Loading</div>
</div>

...........................................
...........................................
...........................................
...........................................

<div style="overflow:hidden;width:715px;">
<div id="cse" style="width: 714px;">Loading</div>

<script src="http://www.google.com/jsapi" type="text/javascript"></script>
<script type="text/javascript">
google.load('search', '1', {language : 'th'});
google.setOnLoadCallback(function() {
var customSearchControl = new google.search.CustomSearchControl('xxx:yyyi');
customSearchControl.setResultSetSize(google.search.Search.FILTERED_CSE_RESULTSET);

var searchFormElement = document.getElementById("searchForm");
var drawOptions = new google.search.DrawOptions();
drawOptions.setSearchFormRoot(searchFormElement);

customSearchControl.draw('cse');
customSearchControl.draw('cse',drawOptions);
}, true);
</script>
<link rel="stylesheet" href="css/sitesearch.css" type="text/css" />
<!-- images/btn_search.gif -->
</div>

ไม่มีความคิดเห็น:

แสดงความคิดเห็น