盾怪网教程:是一个免费提供流行杀毒软件教程、在线学习分享的学习平台!

Asp Object 之:ContentType

时间:2024/12/10作者:未知来源:盾怪网教程人气:

[摘要]ContentTypeContentType 属性指定响应的 HTTP 内容类型。如果未指定 ContentType,默认为 text/HTML。语法Response.ContentType [= ...

ContentType

ContentType 属性指定响应的 HTTP 内容类型。如果未指定 ContentType,默认为 text/HTML。

语法

Response.ContentType [= ContentType ] 

参数

ContentType
描述内容类型的字符串。该字符串通常被格式化为类型/子类型,其中类型是常规内容范畴而子类为特定内容类型。有关支持内容类型的完整列表,请参阅 Web 浏览器文档或当前的 HTTP 规格说明。

示例

下面的示例将内容类型设置为 Channel Definition Format(CDF)。

<% Response.ContentType = "application/x-cdf" %> 

下面的示例将 ContentType 属性设置为其他的常见值。

<% Response.ContentType = "text/HTML" %><% Response.ContentType = "image/GIF" %><% Response.ContentType = "image/JPEG" %> 

应用于

Response 对象




关键词:Asp Object 之:ContentType




Copyright © 2012-2018 盾怪网教程(http://www.dunguai.com) .All Rights Reserved 网站地图 友情链接

免责声明:本站资源均来自互联网收集 如有侵犯到您利益的地方请及时联系管理删除,敬请见谅!

QQ:1006262270   邮箱:kfyvi376850063@126.com   手机版