重庆舜平科技有限公司:asp网址内“?”后面的变量如何取得?

来源:百度文库 编辑:高校问答 时间:2024/04/28 01:34:12
现在如下网址:
http://www.ebende.com?about_ebende=公司简介

请问:有什么样的函数可以从以上地址中提取出字符串"about_ebende",也就是说:有什么样的函数可以从地址中提取问号后的变量?

谢谢
你理解错我的意思了。我要的是字符串"about_ebende",而不是它的值。因为我以以下若干条网址:
http;//www.ebende.com/index.asp?about_ebende=***
http://www.ebende.com/news.asp?xxx=***
http://www.ebende.com/about.asp?yyy=***
我只要问号后面的那几个变量"about_ebende"、"xxx"、"yyy"等。

<%
for each names in request.QueryString()
response.Write(names)
response.Write("=")
response.Write(request.QueryString(names))
response.Write("<br>")
next
%>
这样可以取出所有变量名称和变量的值

str_a=request("about_ebende")

例如:
http://www.ebende.com/news.asp?xxx=***

我只要
Request("xxx")
就可以了!!!!

显示:
response.write"Request("xxx")"

request.****("")

***代表去什么类型值,你可以查阅asp帮助! 别直接用request("")。

效率很低的~~!

http://www.ebende.com?about_ebende=公司简介
request.QueryString("about_ebende")的值为:公司简介