ASP中参数接收问题
来源:百度知道 编辑:UC知道 时间:2024/06/23 01:44:47
请问大虾们,在ASP中
1.如何传递隐藏.asp的参数?就是在地址栏中不出现abc.asp?def=g
例如 地址栏中 http://www.adb.com/cde/fgh 如何这样传递和接收参数?
2.asp中如何用replace函数把空格换成"-"?
例如 "this is a test" 我想把他换成 this-is-a-test.html
谢谢!
1.如何传递隐藏.asp的参数?就是在地址栏中不出现abc.asp?def=g
例如 地址栏中 http://www.adb.com/cde/fgh 如何这样传递和接收参数?
2.asp中如何用replace函数把空格换成"-"?
例如 "this is a test" 我想把他换成 this-is-a-test.html
谢谢!
1.你说的隐藏可以用框架,也可以用url重写,估计你的网站是asp,你可以百度一下应该有asp实现的url重写,我没搞过。
2.replace("this is a test","","-")
1.
将表单发送设置为Post方式
2.
假设变量aaa等于"this is a test"
代码如下:
dim aaa '定义变量aaa
aaa = this is a test" '定义变量aaa为"this is a test"
aaa = replace(aaa," ","-")'替换函数
aaa = aaa & ".html" '加上.html
1 采用表单form即可,还可以插入隐藏域(hidden field)来传递一些用户不可见的系统数值
2 replace("this is a test"," ","-")
1. 你可以用POST方法来发送
2. str = replace(str," ","-")
hfdhgfh
js亦可