现在的位置: 首页 > 搜索技术 > 正文

在网页中加入baidu、google搜索引擎

2018年01月28日 搜索技术 ⁄ 共 1459字 ⁄ 字号 评论关闭

以下代码是搜索指定的一个网站(www.cmfu.com)的:

<div   id= "search ">  
        <form     method= "get "   action= "http://www.google.com/search ">
                <span   class= "bold12 "> 用Google搜索本站: </span> <input   type= "hidden "   name= "hl "   value= "zh-CN "   /> <input   type= "hidden "   name= "inlang "   value= "zh-CN "   />
            <input   type= "hidden "   name= "ie "   value= "GB2312 "   /> <input   type= "hidden "   name= "oe "   value= "GB2312 "   /> <input   type= "hidden "   name= "domains "   value= "www.cmfu.com "   /> <input   type= "hidden "   name= "sitesearch "   value= "www.cmfu.com "   /> <input   class= "q "   type= "text "   name= "q "   size= "14 "   maxlength= "180 "   title= "请输入搜索内容 "/> <input     name= "btnG "   src= "style/001/searchbutton.gif "   type= "image "   /> </form>
        </div>

 

 

 

【baidu程序代码】
<form action="http://www.baidu.com/baidu" method=get name="query" target="_blank">
<div align="center">
<input name=tn type=hidden value=baidu>
<a href="http://www.baidu.com/"><img src="http://www.baidu.com/images/baidu_logo.gif"
alt="Baidu" align="bottom" border="0"></a>
<input type=text name=word size=15>
<input type="submit" value="百度搜索">
</div>
</form>

 

 

 google程序代码】
<form method=get action="http://www.google.com/search">
<table bgcolor="#FFFFFF"><tr><td>
<a href="http://www.google.com/intl/zh-CN/">
<img src="http://www.google.com/logos/Logo_40wht.gif"
border="0" alt="Google" align="absmiddle"></a>
<input type=text name=q size=31 maxlength=255 value="">
<input type=hidden name=ie value=GB2312>
<input type=hidden name=oe value=GB2312>
<input type=hidden name=hl value=zh-CN>
<input type=submit name=btnG value="Google 搜索">
</td></tr></table>
</form>

抱歉!评论已关闭.