Response对象3

521大爱小乔哥

521大爱小乔哥

2016-01-29 19:07

Response对象3,Response对象3
  Response对象可以决定接下来向浏览器发送什么页面。这就是response.redirect的
功用所在。我们创建了一个代码文件script formjump.asp来演示这种方法

<html<head
<TITLEFormJump.asp</TITLE
</head<body bgcolor="#FFFFFF"
<form action="FormJumpRespond.asp" method="get"
<SELECT NAME="wheretogo"
<OPTION SELECTED VALUE="fun"Fun</OPTION
<OPTION value="news"Daily News</OPTION
<OPTION value="docs"ASP IIS3 Roadmap/Docs</OPTION
<OPTION value="main"MainPage of ActiveServerPages.com</OPTION
<OPTION value="sample"IIS 3 Sample ASP scripts</OPTION
</SELECT
<input type=submit value="Choose Destination"
</form
</body</html

表单的反馈如下:

<%response.buffer=true%
<html<head
<titleformjumprespond.asp</title&
<body bgcolor="#FFFFFF"
<%
' My ASP program that redirects to URL
thisURL="http://www.activeserverpages.com"
where=Request.QueryString("Wheretogo")
Select Case where
case "main"
      response.redirect thisURL & "/"
case "samples"
      response.redirect thisURL & "/aspsamp/samples/samples.htm"
case "docs"
      response.redirect thisURL & "/iasdocs/aspdocs/roadmap.asp"
case "news"
      response.redirect "http://www.cnn.com"
case "fun"
      response.redirect "http://www.dilbert.com"
End Select
response.write "All dressed up and I don't know where to go<br"
response.write "I recommend -- " & "<br"
response.write server.htmlencode(thisURL & "/learn/test/res2.asp?
where=fun") & "<br"
response.write "for a good laugh!" & "<P"
%
</body</html


 
展开更多 50%)
分享

猜你喜欢

Response对象3

ASP
Response对象3

Response对象4

ASP
Response对象4

s8lol主宰符文怎么配

英雄联盟 网络游戏
s8lol主宰符文怎么配

Response对象1

ASP
Response对象1

Response对象5

ASP
Response对象5

lol偷钱流符文搭配推荐

英雄联盟 网络游戏
lol偷钱流符文搭配推荐

Response对象2

ASP
Response对象2

1.8 ASP内建对象Response

Web开发
1.8 ASP内建对象Response

lolAD刺客新符文搭配推荐

英雄联盟
lolAD刺客新符文搭配推荐

漂亮的国产Linux操作系统Open Desktop赏析

漂亮的国产Linux操作系统Open Desktop赏析

浅谈Linux文件系统反删除方法

浅谈Linux文件系统反删除方法
下拉加载更多内容 ↓