Google的站内搜索代码
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 21pt; mso-char-indent-count: 2.0"><SPAN style="FONT-FAMILY: 宋体; mso-bidi-font-size: 10.5pt">对于一个网站来说,使用搜索引擎来进行站内搜索往往比自己编写的站内搜索更高效,并且不占用网站服务器的资源,下面是<SPAN lang=EN-US>Google</SPAN>的站内搜索代码,使用时只需要将代码里的<SPAN lang=EN-US>"www.rdzjw.com"</SPAN>替换成你的网址即可。(<FONT color=#f70938>以下有三种方式,可根据需要选择</FONT>)</SPAN></P><P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 21pt; mso-char-indent-count: 2.0"><SPAN style="FONT-FAMILY: 宋体; mso-bidi-font-size: 10.5pt"><SPAN lang=EN-US><?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" /><o:p></o:p></SPAN></SPAN> </P><P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US style="FONT-FAMILY: 宋体; mso-bidi-font-size: 10.5pt"><o:p> </o:p></SPAN><B style="mso-bidi-font-weight: normal"><SPAN style="FONT-FAMILY: 宋体; mso-bidi-font-size: 10.5pt">下面是<SPAN lang=EN-US>Google</SPAN>的的站内搜索代码:<SPAN lang=EN-US><o:p></o:p></SPAN></SPAN></B></P><P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US style="FONT-FAMILY: 宋体; mso-bidi-font-size: 10.5pt"><o:p> </o:p></SPAN></P><P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US style="FONT-FAMILY: 宋体; mso-bidi-font-size: 10.5pt"><!--Google</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-bidi-font-size: 10.5pt">站内搜索开始<SPAN lang=EN-US>--><BR><form method=get action="http://www.google.com/search"><BR><input type=text name=q><BR><input type=submit name=btnG value="Google </SPAN>搜索<SPAN lang=EN-US>"><BR><input type=hidden name=ie value=GB2312><BR><input type=hidden name=oe value=GB2312><BR><input type=hidden name=hl value=zh-CN><BR><input type=hidden name=domains value="www.rdzjw.com"><BR><input type=hidden name=sitesearch value="www.rdzjw.com"><BR></form><BR><!--Google</SPAN>站内搜索结束<SPAN lang=EN-US>--><o:p></o:p></SPAN></SPAN></P><P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US style="FONT-FAMILY: 宋体; mso-bidi-font-size: 10.5pt"><o:p> </o:p></SPAN></P><P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 10.5pt; mso-char-indent-count: 1.0"><SPAN style="FONT-FAMILY: 宋体; mso-bidi-font-size: 10.5pt">使用中,大家可能碰到需要修改很多地方才能适合您的需要,如何修改?以面的代码,改进了原版的<SPAN lang=EN-US>GG</SPAN>:<SPAN style="COLOR: red">可在新窗口中弹出搜索内容;可修改背景色和文字颜色<SPAN lang=EN-US>…</SPAN></SPAN></SPAN></P><P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 10.5pt; mso-char-indent-count: 1.0"><SPAN style="FONT-FAMILY: 宋体; mso-bidi-font-size: 10.5pt"><SPAN style="COLOR: red"><SPAN lang=EN-US>效果演示页面:<A target=_blank href="http://www.rdzjw.com/Default.asp">http://www.rdzjw.com/Default.asp</A> (最底部--统计信息处)</SPAN></SPAN></SPAN></P><P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US style="FONT-FAMILY: 宋体; mso-bidi-font-size: 10.5pt"><o:p> </o:p></SPAN></P><P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US style="COLOR: blue; FONT-FAMILY: 宋体; mso-bidi-font-size: 10.5pt"><!-- SiteSearch Google --><o:p></o:p></SPAN></P><P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US style="COLOR: blue; FONT-FAMILY: 宋体; mso-bidi-font-size: 10.5pt"><form action="http://www.google.com/search" method=get target="_blank"><o:p></o:p></SPAN></P><P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US style="COLOR: blue; FONT-FAMILY: 宋体; mso-bidi-font-size: 10.5pt"><table><o:p></o:p></SPAN></P><P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US style="COLOR: blue; FONT-FAMILY: 宋体; mso-bidi-font-size: 10.5pt"><SPAN style="mso-spacerun: yes"> </SPAN><tr><td><o:p></o:p></SPAN></P><P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US style="COLOR: blue; FONT-FAMILY: 宋体; mso-bidi-font-size: 10.5pt"><a href="http://www.google.com/" target="_blank"><o:p></o:p></SPAN></P><P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US style="COLOR: blue; FONT-FAMILY: 宋体; mso-bidi-font-size: 10.5pt"><img src="http://www.google.com/logos/Logo_25wht.gif" <o:p></o:p></SPAN></P><P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US style="COLOR: blue; FONT-FAMILY: 宋体; mso-bidi-font-size: 10.5pt">border="0" alt="Google"></a><o:p></o:p></SPAN></P><P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US style="COLOR: blue; FONT-FAMILY: 宋体; mso-bidi-font-size: 10.5pt"></td><o:p></o:p></SPAN></P><P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US style="COLOR: blue; FONT-FAMILY: 宋体; mso-bidi-font-size: 10.5pt"><td><o:p></o:p></SPAN></P><P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US style="COLOR: blue; FONT-FAMILY: 宋体; mso-bidi-font-size: 10.5pt"><input type=text name=q size=31 maxlength=255 value=""><o:p></o:p></SPAN></P><P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US style="COLOR: blue; FONT-FAMILY: 宋体; mso-bidi-font-size: 10.5pt"><input type=hidden name=ie value=GB2312><o:p></o:p></SPAN></P><P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US style="COLOR: blue; FONT-FAMILY: 宋体; mso-bidi-font-size: 10.5pt"><input type=hidden name=oe value=GB2312><o:p></o:p></SPAN></P><P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US style="COLOR: blue; FONT-FAMILY: 宋体; mso-bidi-font-size: 10.5pt"><input type=hidden name=hl value=zh-CN><o:p></o:p></SPAN></P><P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US style="COLOR: blue; FONT-FAMILY: 宋体; mso-bidi-font-size: 10.5pt"><input type=submit name=btnG value="Google </SPAN><SPAN style="COLOR: blue; FONT-FAMILY: 宋体; mso-bidi-font-size: 10.5pt">搜索<SPAN lang=EN-US>"><o:p></o:p></SPAN></SPAN></P><P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US style="COLOR: blue; FONT-FAMILY: 宋体; mso-bidi-font-size: 10.5pt"><font size=-1><o:p></o:p></SPAN></P><P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US style="COLOR: blue; FONT-FAMILY: 宋体; mso-bidi-font-size: 10.5pt"><input type=hidden name=domains value="www.rdzjw.com"><br><o:p></o:p></SPAN></P><P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US style="COLOR: blue; FONT-FAMILY: 宋体; mso-bidi-font-size: 10.5pt"><input type=radio name=sitesearch value=""> <o:p></o:p></SPAN></P><P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US style="COLOR: blue; FONT-FAMILY: 宋体; mso-bidi-font-size: 10.5pt"></font><span class="style1"></SPAN><SPAN style="COLOR: blue; FONT-FAMILY: 宋体; mso-bidi-font-size: 10.5pt">搜索<SPAN lang=EN-US>[</SPAN>互联网<SPAN lang=EN-US>]</span><font size=-1><o:p></o:p></SPAN></SPAN></P><P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US style="COLOR: blue; FONT-FAMILY: 宋体; mso-bidi-font-size: 10.5pt"><input type=radio name=sitesearch value="www.rdzjw.com" checked> <o:p></o:p></SPAN></P><P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US style="COLOR: blue; FONT-FAMILY: 宋体; mso-bidi-font-size: 10.5pt"></font><span class="style1"></SPAN><SPAN style="COLOR: blue; FONT-FAMILY: 宋体; mso-bidi-font-size: 10.5pt">搜索<SPAN lang=EN-US>[</SPAN>弱电之家网<SPAN lang=EN-US>]</span><o:p></o:p></SPAN></SPAN></P><P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US style="COLOR: blue; FONT-FAMILY: 宋体; mso-bidi-font-size: 10.5pt"></td><o:p></o:p></SPAN></P><P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US style="COLOR: blue; FONT-FAMILY: 宋体; mso-bidi-font-size: 10.5pt"></tr></table><o:p></o:p></SPAN></P><P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US style="COLOR: blue; FONT-FAMILY: 宋体; mso-bidi-font-size: 10.5pt"></form><o:p></o:p></SPAN></P><P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US style="COLOR: blue; FONT-FAMILY: 宋体; mso-bidi-font-size: 10.5pt"><!-- SiteSearch Google --></td><o:p></o:p></SPAN></P><P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US style="FONT-FAMILY: 宋体; mso-bidi-font-size: 10.5pt"><o:p> </o:p></SPAN></P><P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US style="FONT-FAMILY: 宋体; mso-bidi-font-size: 10.5pt"><o:p> </o:p></SPAN></P><P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><B style="mso-bidi-font-weight: normal"><SPAN style="FONT-FAMILY: 宋体; mso-bidi-font-size: 10.5pt">下面是<SPAN lang=EN-US>Google</SPAN>的<SPAN lang=EN-US>Javascript</SPAN>版的站内搜索代码:<SPAN lang=EN-US><o:p></o:p></SPAN></SPAN></B></P><P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US style="FONT-FAMILY: 宋体; mso-bidi-font-size: 10.5pt"><o:p> </o:p></SPAN></P><P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US style="FONT-FAMILY: 宋体; mso-bidi-font-size: 10.5pt"><!--Google</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-bidi-font-size: 10.5pt">站内搜索开始<SPAN lang=EN-US>--><BR><script type="text/javascript"> <BR>function googlesearch () {<BR>var wq=document.getElementsByName("wq").value;<BR>var link="http://www.google.com/search?domains=www.rdzjw.com&sitesearch=www.rdzjw.com&q="+wq;<BR>window.open(link); }<BR></script><BR><input type="text" name="wq"/><input type="submit" onclick="javascript:googlesearch()" value="Google </SPAN>搜索<SPAN lang=EN-US>" /><BR><!--Google</SPAN>站内搜索结束<SPAN lang=EN-US>--><o:p></o:p></SPAN></SPAN></P><P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US style="FONT-FAMILY: 宋体; mso-bidi-font-size: 10.5pt"><o:p> </o:p></SPAN></P><P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US style="FONT-FAMILY: 宋体; mso-bidi-font-size: 10.5pt"><o:p>关键词:<A target=_blank href="http://bbs.rdzjw.com/Search.asp?menu=ok&Search=key&content=站内搜索" target=_blank><FONT color=#ff0033>站内搜索</FONT></A></o:p></SPAN></P>
页:
[1]