您的位置:首页 > 编程语言

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

2006-10-31 12:28 330 查看
在首页适当的位置加入

<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”
很简单的代码,不过现在你就可以实现站内搜索了。

当然百度提供了更强大,免费的站内搜索代码。
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: