Response.ContentType 详细列表

作者: 浏览: 发布日期:2011-05-02
[导读]:

不同的ContentType 会影响客户端所看到的效果.默认的ContentType text/html 也就是网页格式.

代码如:

 

<% response.ContentType ="text/html" %>

<!--i nclude virtual="/ContentType.html" -->

显示的为网页

 

<% response.ContentType ="text/plain" %>

<!--i nclude virtual="/sscript/ContentType.html" -->

则会显示html原代码.

 

 

 

以下为一些常用的 ContentType

GIF images

<% response.ContentType ="image/gif" %>

<!--i nclude virtual="/myimage.gif" -->

 

 

JPEG images

<% response.ContentType ="image/jpeg" %>

<!--i nclude virtual="/myimage.jpeg" -->

 

 

TIFF images

<% response.ContentType ="image/tiff" %>

<!--i nclude virtual="/myimage.tiff" -->

 

 

MICROSOFT WORD document

<% response.ContentType ="application/msword" %>

<!--i nclude virtual="/myfile.doc" -->

 

 

RTF document

<% response.ContentType ="application/rtf" %>

<!--i nclude virtual="/myfile.rtf" -->

 

MICROSOFT EXCEL document

<% response.ContentType ="application/x-excel" %>

<!--i nclude virtual="/myfile.xls" -->

 

 


免责声明:本文来源于网络,版权归原作者所有,仅供大家共同分享学习,如作者认为涉及侵权,请与我们联系,我们核实后立即删除。本站地址:http://www.sjz2.cn/news/show-929.html
请填写下方表单,我们会尽快与您联系
感谢您的咨询,我们会尽快给您回复!