Response对象1

为民守望黎明

为民守望黎明

2016-01-29 19:07

Response对象1,Response对象1
  Response对象非常重要,而且有许多特性。我们将关注其最常用的一些功能。可用于
80%场合的20%的功能。

response.write
response.write的变体 <%= %它可使ASP方便地插入HTML中
response.end which 有效地中止代码
response.redirect 调用其它页面
下面是一个实例,用response.write发送信息到浏览器。同时用到了dateadd,一个
内建功能,相关文档在:
http://help.activeserverpages.com/iishelp/VBScript/htm/vbs90.htm.

<html<head
<titleresponse.asp</title&
<body color="#FFFFFF"
<%
when=now()
tommorow=dateadd("d",1,when)
twoweekslater=dateadd("ww",2,when)
fourteenweekdayslater=dateadd("w",14,when)
monthlater=dateadd("m",1,when)

sixminuteslater=dateadd("n",6,when)
sixhourslater=dateadd("h",6,when)
fortysecslater=dateadd("s",40,when)

response.write "Now <b" & when & "</b<br"
response.write "tommorow <b" & tommorow & "</b<br"
response.write "2 weeks from Now <b" & twoweekslater & "</b<br"
response.write "fourteen working days from Now <b" &
fourteenweekdayslater & "</b<br"
response.write "1 month from Now <b" & monthlater & "</b<br"
%
six minutes from now <b <%=sixminuteslater% </b<br
six hours from now <b <%=sixhourslater% </b<br
fourty seconds later <b <%=fortysecslater% </b<br
</body</html



下面是用response.end终止一个页面操作:

<html<head
<titleend.asp</title&
<body color="#FFFFFF"
<%
when=now()
tommorow=dateadd("d",1,when)
twoweekslater=dateadd("w",2,when)
monthlater=dateadd("m",1,when)
sixminuteslater=dateadd("n",6,when)
sixhourslater=dateadd("h",6,when)

response.write "Now <b" & when & "</b<br"
response.write "1 month from Now <b" & monthlater & "</b<br"
response.end
response.write "2 weeks from Now <b" & twoweekslater & "</b<br"
%
six minutes from now <b <%=sixminuteslater% </b<br
six hours from now <b <%=sixhourslater% </b<br
 
展开更多 50%)
分享

猜你喜欢

Response对象1

ASP
Response对象1

Response对象4

ASP
Response对象4

s8lol主宰符文怎么配

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

Response对象5

ASP
Response对象5

Response对象3

ASP
Response对象3

lol偷钱流符文搭配推荐

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

Response对象2

ASP
Response对象2

1.8 ASP内建对象Response

Web开发
1.8 ASP内建对象Response

lolAD刺客新符文搭配推荐

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

Photoshop教程:简单几步给图片加上漂亮的边框

Photoshop教程:简单几步给图片加上漂亮的边框

微软Page Counter 组件参考(一)

微软Page Counter 组件参考(一)
下拉加载更多内容 ↓