PC6下载站

分类分类

Response对象3

关注+2004-11-07作者:蓝点

Response对象可以决定接下来向浏览器发送什么页面。这就是response.redirect的

功用所在。我们创建了一个代码文件script formjump.asp来演示这种方法





FormJump.asp















表单的反馈如下:



<%response.buffer=true%>



formjumprespond.asp&



<%

' 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
"

response.write "I recommend --> " & "
"

response.write server.htmlencode(thisURL & "/learn/test/res2.asp?

where=fun") & "
"

response.write "for a good laugh!" & "

"

%>








展开全部

相关文章

更多+相同厂商

热门推荐

  • 最新排行
  • 最热排行
  • 评分最高
排行榜

    点击查看更多

      点击查看更多

        点击查看更多

        说两句网友评论

          我要评论...
          取消