点击链接弹出保存图片对话框的asp代码2010-02-25call download(server.mappath("./test.jpg")) Function download(File) temp = Split(File, "") filename = temp(UBound(temp)) Set s = CreateObject("adodb.stream") s.mode = 3 s.Type = 1 s.Open s.loadfromfile(File) data = s.Read If IsNull(data) Then response.Write "空" Else response.Clear Response.ContentType = "application/octet-stream" Response.AddHeader "Content-Disposition", "attachment; filename=" & filename response.binarywrite(data) End If Set s = Nothing End Function