求助!!!!!!!!!!
网站演示:http://www.czhy.net/就是用下面的搜索框可以直接搜索数据!显示内容!!!!!!!!!!
005776291889144454513:cqnpdbm7g4a这个是自定义搜索的代码<div id="cse" style="width: 100%;">Loading</div>
<script src="http://www.google.com/jsapi" type="text/javascript"></script>
<script type="text/javascript">
google.load('search', '1', {language : 'zh-CN'});
google.setOnLoadCallback(function() {
var customSearchControl = new google.search.CustomSearchControl('005776291889144454513:cqnpdbm7g4a');
customSearchControl.setResultSetSize(google.search.Search.FILTERED_CSE_RESULTSET);
customSearchControl.draw('cse');
}, true);
</script>
<link rel="stylesheet" href="http://www.google.com/cse/style/look/default.css" type="text/css" /> 上半部分是谷歌的自定义搜索代码
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html lang='zh-CN' xml:lang='zh-CN' xmlns='http://www.w3.org/1999/xhtml'>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312"/>
<meta http-equiv="Content-Language" content="zh-CN"/>
<style>
#banner_search {
BORDER-RIGHT: #53bf41 1px solid; PADDING-RIGHT: 3px; BORDER-TOP: #53bf41 1px solid; MARGIN-TOP: 2px; PADDING-LEFT: 3px; BACKGROUND: #efe; FLOAT: right; PADDING-BOTTOM: 3px; BORDER-LEFT: #53bf41 1px solid; WIDTH: 525px; PADDING-TOP: 3px; BORDER-BOTTOM: #53bf41 1px solid
}
#banner_search .hot_keys {
PADDING-TOP: 2px
}
#banner_search .hot_keys A {
FONT-SIZE: 11px; COLOR: #060; MARGIN-RIGHT: 6px
}
.searchForm INPUT {
FLOAT: left
}
.searchForm INPUT.text_input {
BORDER-RIGHT: #d8d7d7 1px solid; PADDING-RIGHT: 5px; BORDER-TOP: #bbbbbb 1px solid; PADDING-LEFT: 5px; FONT-SIZE: 16px; PADDING-BOTTOM: 0px; BORDER-LEFT: #bbbbbb 1px solid; WIDTH: 405px; COLOR: #777; PADDING-TOP: 5px; BORDER-BOTTOM: #d8d7d7 1px solid; HEIGHT: 21px
}
</style>
</head>
<body>
<DIV id=banner_search>
<FORM class=searchForm action=/project/search><INPUT class=text_input
onblur="(this.value=='')?this.value='在 12654 款开源软件中搜索':this.value"
onfocus="if(this.value=='在 12654 款开源软件中搜索'){this.value='';};this.select();"
value="在 12654 款开源软件中搜索" name=q> <INPUT type=image
src="search.gif">
</FORM></DIV>
</body></html>上半部分是搜索框代码!!!!!
怎么将谷歌的代码加入到搜索框中区!!!!!!!!!!!! 直接用css控制google搜索条好了 不懂的人飘过 已经弄好啦!哈哈!www.yaxin.org
页:
[1]