论坛快速导航: 2009年素材区 矢量素材 图片素材 网页模板 原创作品 佳作欣赏 网页设计专区 摄影之家 PhotoShop CorelDraw Illustrator | 在线繁体字转换翻译工具 WAP RSS
返回简洁设计网首页
最新教程 推荐教程 热门教程
当前位置: 简洁设计网 > 设计教程 > 程序开发 > ASP专区 > ASP技巧 > 正文
使用AspUpload组件获取表单数据问题
方法1:

直接用
xxx=upload.form("imgname")


其他方法:



form里的值不能Request,但是querystring可以,可以试试这样
<script language="javascript">
function uploadData(){
frm1.action+='&path='+frm1.sPath.value;
//alert(frm1.action);
frm1.submit();
}
</script>
<%
if Request("action") = "upload" then
sPath = Request("path")
call UploadFunction()
end if
%>
<form name="frm1" action="testup.asp?action=upload" method="post" enctype="multipart/form-data">
<input type="text" name="sPath"><br>
<input type="file" name="txtFile" class="topinput" id="txtFile"><br>
<input type="button" value="上传文件" class="topinput" onclick="uploadData();">
</form>
------------------------------------------------------------
另外,aspupload里有个move方法,不知道是否适用
Set Upload = Server.CreateObject("Persits.Upload.1")
Upload.Save (myPath)
For Each FileObj In Upload.Files
filename = FileObj.Path
Next
Set f1 = fso.GetFile(filename)
For Each Item In Upload.Form
arr(i) = Item.Value
arr(i) = Replace(arr(i)‚ "'"‚ "''")
i = i + 1
Next
f1.Move (myPath & "\" & arr(0) & "\ExcelToSTOCK.xls")

点击进入论坛和大家一起交流设计,分享设计素材,结交设计朋友
设为首页 | 加入收藏 | 关于我们 | 联系我们 | 合作伙伴 | 版权信息 | 广告联系 | 友情链接 | 网站地图
版权所有 简洁设计网 [www.jianjie8.com] 您电脑的分辨率是 像素
Copyright 2008-2015 Www.Jianjie8.Com All Rights Reserved
陇ICP备05003399号