是啊 是啊 csdn就有 自己查看一下源代码吧
解决方案 »
- js中这三个float型相加,结果怎么会这样?
- insertAdjacentElement与firefox
- [原创]永不过期的网页:
- javascript
- javascript 表单中checkbox全选
- *****用Javascript保存XML文件到本地的安全性问题?如果能解决问题,再送100分*****
- 关于用window.open打开不同类型的东西
- 有一个串“ab,ef,aghg”,用javascript如何读取这个穿然后按照逗号分割,最后输出?
- 讨论一种新的B/S框架结构
- html问题:如何刷新frameset里面调用的html页面(kingofark)
- 难受死了....框架问题
- 窗口之间的交互
比如:
<a href="test.doc">test</a>
如何用脚本实现把test.doc另存为
或
javascript:saveas(xxxxxx)
<a href="test.rar">test</a>
AdoStream.Open
AdoStream.Type = 1
AdoStream.LoadFromFile FileName
Select Case LCase(Right(FileName, 4))
Case ".asf"
ContentType = "video/x-ms-asf"
Case ".avi"
ContentType = "video/avi"
Case ".doc"
ContentType = "application/msword"
Case ".zip"
ContentType = "application/zip"
Case ".xls"
ContentType = "application/vnd.ms-excel"
Case ".gif"
ContentType = "image/gif"
Case ".jpg", "jpeg"
ContentType = "image/jpeg"
Case ".wav"
ContentType = "audio/wav"
Case ".mp3"
ContentType = "audio/mpeg3"
Case ".mpg", "mpeg"
ContentType = "video/mpeg"
Case ".rtf"
ContentType = "application/rtf"
Case ".htm", "html"
ContentType = "text/html"
Case ".txt"
ContentType = "text/plain"
Case Else
ContentType = "application/octet-stream"
End Select
Response.AddHeader "Content-Disposition", "attachment; filename=" & FileManager.GetFileName(FileName)
Response.AddHeader "Content-Length", FileSizeResponse.Charset = "UTF-8"
Response.ContentType = ContentTypeResponse.BinaryWrite AdoStream.Read
Response.Flush
Response.Clear
AdoStream.Close
Set AdoStream = Nothing将文件指向某一页面,然后再该页面写入上面代码,传入正确的文件路径和名称,就可以了