最新下载
热门教程
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
asp 无刷新上传带预览程序代码
时间:2015-03-28 编辑:简简单单 来源:一聚教程网
首先我是使用艾恩ASP无组件上传类的iframe。直接在框架里面上传后赋值给父窗口的input。下面就是index.php的代码了。但是这个这能上传一张图片不能批量上传图片! 单文件上传<%end if%>
然后这个是asp后台写入图片的代码了!是asp的注意 <% if lcase(request.ServerVariables("REQUEST_METHOD"))="post" then dim upload set upload = new AnUpLoad upload.Exe = "jpg|bmp|jpeg|gif|png" upload.MaxSize = 2 * 1024 * 1024 '2M upload.GetData() if upload.ErrorID>0 then response.Write upload.Description else dim file,savpath savepath = "upload" set file = upload.files("file1") if file.isfile then result = file.saveToFile(savepath,0,true) if result then msg = file.filename else msg = file.Exception end if end if end if set upload = nothing %> 重新上传 <%else%>
至于 这个 UpLoad_Class.asp 文件大家就去网上找吧!。这个是就上传后的效果图片了
没有上传图片前
上传图片之后
相关文章
- VBS 批量Ping的项目讲解 09-19
- 如何封装一个Ajax函数介绍 09-16
- ASP实现加法验证码方法 09-16
- ASP错误捕获的几种常规处理方法介绍 09-16
- ajax实现城市三级联动的代码介绍 09-16
- asp中获取日期为星期几的技巧 09-14