用百度进行站内搜索源代码

在首页适当的位置加入

 

<form name="form2" method="post" action="sousuo.asp"
<input name="word" type="text" size="15" style="background-color:#ffffff;color
:#8888AA; border: 1 double #B4B4B4" onMouseOver= "this.style.backgroundColor = '
#F7FBFF'" onMouseOut= "this.style.backgroundColor = ''">
<input type="submit" name="Submit3" value="搜索">
</form>



新建sousuo.asp文件放入代码

<script language="VBScript">
window.location="http://www.baidu.com/s?wd=<%=request("word")%>+site%3Ahh
22.net&cl=3"
</script>

把hh22.net换成你的域名,不用加“WWW”
很简单的代码,不过现在你就可以实现站内搜索了。

当然百度提供了更强大,免费的站内搜索代码。

posted @ 2006-10-31 12:28  小y  阅读(2059)  评论(0编辑  收藏  举报