【www.bbyears.com--窗口特效】
首先我是使用艾恩ASP无组件上传类的iframe。直接在框架里面上传后赋值给父窗口的input。下面就是index.php的代码了。但是这个这能上传一张图片不能批量上传图片! 单文件上传<%end if%>
<script> function backfn(fname){ document.getElementById("file").value=fname; document.getElementById("fimg").src="upload/"+fname; } </script> 然后这个是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 %> 重新上传 <script>window.parent.backfn.apply(this,["<%=msg%>"]);</script> <%else%>
至于 这个 UpLoad_Class.asp 文件大家就去网上找吧!。这个是就上传后的效果图片了
没有上传图片前
word-spacing: 0px; white-space: normal; widows: 1; font-size-adjust: none; font-stretch: normal; background-color: rgb(250, 250, 250); -webkit-text-stroke-width: 0px;">
上传图片之后
word-spacing: 0px; white-space: normal; widows: 1; font-size-adjust: none; font-stretch: normal; background-color: rgb(250, 250, 250); -webkit-text-stroke-width: 0px;">