多收集几个网站的,然后我们引用它到自己的页面中。
接下来,我们要创建页面用于搜索:
<center>
<form action="web_search.asp" method="post">
<select name="selEngines">
<option value="yahoo">雅虎快找!</option>
...
</select>
<input type="text" name="txtSearchWords" size="30">
<input type="submit" name="btnSearch" value="搜索">
</form>
</center>
可以看到,当列出搜索引擎的查询字符串时,那些搜索字符变成了蓝色,这就要输入到我们的文本框strSearchWords的值,再用一个带Response.Redirect的If...Then语句重定向到用户所选择的搜索引擎中去。如果有多个搜索引擎,我们要为其中的每一个编写如下代码:
If Request.Form("selEngines") = "yahoo" Then
Response.Redirect("http://search.yahoo.com/bin/search?p=" & _
Request.Form("txtSearchWords"))
End If
转载于:https://blog.51cto.com/bobwu/534360