必威体育Betway必威体育官网
当前位置:首页 > IT技术

如何在网页中嵌入搜索引擎(百度,google)

时间:2019-08-12 08:15:36来源:IT技术作者:seo实验室小编阅读:64次「手机版」
 

加入搜索引擎

Google


<form action="http://www.google.com/search"   name=f>
	<span   id=hf></span>
	<table   cellspacing=0   cellpadding=0>
		<tr   valign=middle>
			<td   width=75>&nbsp;</td>
			<td   align=center>
				<input   maxLength=256   size=55   name=q   value="">   
				  <script>   
				  document.f.q.focus();   
				  </script>   
	  			<input   type=hidden   name=ie   value="UTF-8">
	  			<input   type=hidden   name=oe   value="UTF-8">
	  			<input   name=hl   type=hidden   value=zh-CN>
	  			<br>
	  			<input   type=submit   value="Google搜索"   name=btnG>
	  			<input   type=submit   value="手气不错"   name=btnI>
	  		</td>
	  		<td   valign=top   nowrap>
	  			<font   size=-1>&nbsp;&#8226;&nbsp;<a   href=http://www.google.com/advanced_search?hl=zh-CN>高级搜索</a><br>&nbsp;&#8226;&nbsp;
	  			<a   href=http://www.google.com/preferences?hl=zh-CN>使用偏好</a><br>&nbsp;&#8226;&nbsp;
	  			<a   href=http://www.google.com/language_tools?hl=zh-CN>语言工具</a>
	  			</font>
	  		</td>
	  	</tr>
	  	<tr>
	  		<td   colspan=3   align=center>
	  			<font   size=-1>
	  			<input   id=all   type=radio   name=lr   value=""   checked>
	  			<label   for=all>搜索所有网站</label>
	  			<input   id=ch   type=radio   name=lr   value=lang_zh-CN|lang_zh-TW   >
	  			<label   for=ch>搜索所有中文网页</label>
	  			<input   id=il   type=radio   name=lr   value=lang_zh-CN   >
	  			<label   for=il>搜索简体中文网页</label>
	  			</font>
	  		</td>
	  	</tr>
	  </table>
</form></form>

baidu1:


<iframe id="baiduframe" marginwidth="0" marginheight="0" scrolling="no"
		  framespacing="0" vspace="0" hspace="0" frameborder="0" width="200" height="30" 
		  src="http://unstat.baidu.com/bdun.bsc?tn=dsccsb_pg&cv=0&cid=1180963&csid=102&bgcr=ffffff&urlcr=0000ff&tbsz=80&defid=2">
		</iframe>

baidu2:


<form action="http://www.baidu.com/baidu" target="_blank">
			<table bgcolor="#FFFFFF"><tr><td>
				<input name=tn type=hidden value=baidu>
				<a href="http://www.baidu.com/">
					<img src="http://img.baidu.com/img/logo-80px.gif" alt="Baidu" align="bottom" border="0">
				</a>
				<input type=text name=word size=30>
				<input type="submit" value="百度搜索">
			</td></tr>
			</table>
</form>

baidu分类搜索:


<SCRIPT language=javascript>
function gowhere1(formname)
{
 var url;
 if (formname.myselectvalue.value == "0")
 {
  url = "http://www.baidu.com/baidu";
  document.search_form1.tn.value = "baidu";
  formname.method = "get";
 }
 if (formname.myselectvalue.value == "1")
 {
  url = "http://mp3.baidu.com/m";
  document.search_form1.tn.value = "baidump3";
  document.search_form1.ct.value = "134217728";
  document.search_form1.lm.value = "-1";
 }

 if (formname.myselectvalue.value == "4")
 {
  document.search_form1.tn.value = "news";
  document.search_form1.cl.value = "2";
  document.search_form1.rn.value = "20";
  url = "http://news.baidu.com/ns";
 }
 if (formname.myselectvalue.value == "5")
 {
  document.search_form1.tn.value = "baiduiamge";
  document.search_form1.ct.value = "201326592";
  document.search_form1.cl.value = "2";
  document.search_form1.lm.value = "-1";
  url = "http://image.baidu.com/i";
}
if (formname.myselectvalue.value == "6")
 {
  url = "http://post.baidu.com/f";
  document.search_form1.tn.value = "baiduPostSearch";
  document.search_form1.ct.value = "352321536";
  document.search_form1.rn.value = "10";
  document.search_form1.lm.value = "65536";
 }

  formname.action = url;
 return true;
}
</SCRIPT>
<form name="search_form1" target="_blank" οnsubmit="return gowhere1(this)">
<table width="460" height="60" border="0" bgcolor="#FFFFFF" cellpadding="0" cellspacing="0" style=font-family:宋体><tr><td>
<TABLE width="460" height="80" border=0 cellPadding=0 cellSpacing=0>
      <INPUT name=myselectvalue type=hidden value=0>
      <INPUT name=tn type=hidden>
      <INPUT name=ct type=hidden>
      <INPUT name=lm type=hidden>
      <INPUT name=cl type=hidden>
      <INPUT name=rn type=hidden>
      <TR>
                  <TD width="8%" valign="bottom">
                    <DIV align=center><a href="http://www.baidu.com/"><img src="http://img.baidu.com/img/logo-80px.gif"
alt="Baidu" align="bottom" border="0"></a></DIV></TD>
    <TD vAlign=bottom width="92%">
<INPUT name=myselect οnclick=JavaScript:this.form.myselectvalue.value=4; type=radio value=0>
                    <FONT color=#0000cc style="FONT-SIZE: 12px">新闻</FONT>

                   <INPUT CHECKED name=myselect οnclick=javascript:this.form.myselectvalue.value=0; type=radio value=0>
                    <SPAN class=f12><FONT color=#0000cc style="FONT-SIZE: 12px">网页</FONT></SPAN>
                    <INPUT name=myselect οnclick=javascript:this.form.myselectvalue.value=1; type=radio value=1>
                    <SPAN class=f12><FONT color=#0000cc style="FONT-SIZE: 12px">mp3</FONT></SPAN>
<INPUT name=myselect οnclick=javascript:this.form.myselectvalue.value=6; type=radio value=0>
<FONT color=#0000cc style="FONT-SIZE: 12px">贴吧</FONT>
<INPUT name=myselect οnclick=javascript:this.form.myselectvalue.value=5; type=radio value=0>
                    <FONT color=#0000cc style="FONT-SIZE: 12px">图片</FONT>

                    <TABLE align=right border=0 cellPadding=0 cellSpacing=0 width="100%">
                      <tbody>
                        <TR>
                          <TD><FONT style="FONT-SIZE: 12px">
                            <input id=word name=word size="40">
                            </FONT> <input type="submit" value="百度搜索"> </TD></TR>

       </form>

baidu可以站内搜索,您只需要用您的网站地址替换代码中"www.guoxue.com"即可实现站内搜索功能。


<SCRIPT language=javascript>
function g(formname)	{
var url = "http://www.baidu.com/baidu";
if (formname.s[1].checked) {
	formname.ct.value = "2097152";
}
else {
	formname.ct.value = "0";
}
formname.action = url;
return true;
}
</SCRIPT>
<form name="f1" οnsubmit="return g(this)">
<table bgcolor="#FFFFFF" style="font-size:9pt;">
<tr height="60"><td valign="top"><img src="http://img.baidu.com/img/logo-137px.gif" border="0" alt="baidu"></td>
<td>
<input name=word size="30" maxlength="100">
<input type="submit" value="百度搜索"><br>
<input name=tn type=hidden value="bds">
<input name=cl type=hidden value="3">
<input name=ct type=hidden>
<input name=si type=hidden value="www.guoxue.com">
<input name=s type=radio> 互联网
<input name=s type=radio checked> www.guoxue.com
</td></tr></table>
</form>

相关阅读

嵌入式Linux——学习经历

简介: 本文主要介绍我学习嵌入式的经历。并结合自身的经验希望可以对大家有所帮助。 视频及教材: 郭天祥相关视频及教材,天狼星相

搜索引擎工作原理解析

本篇文章从整个搜索引擎架构技术大框架方面来学习,搜索引擎工作原理。 1 搜索引擎基本模块 2 爬虫 网络爬虫(Web crawler),是

嵌入式STM32学习:I2C-读写EEPROM2

bsp_i2c_ee.h #ifndef __I2C_EE_H #define __I2C_EE_H #include "stm32f4xx.h" /* AT24C01/02每页有8个字节 */ #define I2

搜索引擎必知的5个日常使用技巧

感觉啊,现在常见或不常见的搜索引擎种类繁多,不同品牌出品的引擎都有着自身的优势和劣势,但常玩网的盆友都知道:根据搜索目的去选择搜

各大磁力种子搜索引擎对比

现在磁力种子搜索引擎质量参差不齐,现在就重点整理几个常用的种子搜索站,做个对比分析1.屌丝搜-最懂屌丝的BT搜索引擎(www.diaosisou

分享到:

栏目导航

推荐阅读

热门阅读