Press "Enter" to skip to content

ASP中Response对象的集合、属性和方法介绍

Response对象与一个HTTP响应相响应,通过该对象的属性和方法可以控制如何将服务器的数据发送到客户端浏览器。

在ASP脚本中使用Response对象时,遵循以下语法格式:
Response.集合名
Response.属性名
Response.方法名

Response对象只有一个Cookies集合,该集合的各个属性如下表:

 =================示例===========================
<%@ language=”vbscript” codepage=”936″%>
<%
Response.Buffer=True
Response.Write “<html>”
Response.Write “<head>”
Response.Write “<title>Response.Write方法应用示例</title>”
Response.Write “<style type=text/css>”
Response.Write “<!– .style1{font-family:宋体;font-size:9pt} –>”
Response.Write “</style>”
Response.Write “<body>”
Response.Write “<div align=””center”” class=””style1″”>”
Response.Write “赠 汪 伦<br>李白<hr>”
Response.Write “李白乘舟将欲行,忽闻岸上踏歌声。<br>”
Response.Write “桃花潭水深千尺,不及汪伦送我情。<br>”
Response.Write “</div>”
Response.Write “</body>”
Response.Write “</html>”
%>
=================效果===========================

2 Comments

  1. Anonymous 2009-08-09

    看不懂

Leave a Reply

Your email address will not be published. Required fields are marked *