关于使用upload_5xsoft上传的问题?
在使用upload_5xsoft上传时,
我想使用一个text和一个butto控件来代替file控件的效果,主要是因为按键名称要改为
"変 更",如下:
<input type="text" name="text" id="text">
<input type="button" value="変 更" onClick="file.click();text.value=file.value;">
<input type="file" name="file" id="file" style="display:none">
但是在提交时,确无法获得"file",不能正常上传文件,还是需要使用其他的控件替换才能代替file控件的效果呢,请大家帮忙看看,谢谢了!!!
----------------------------------------------
提交页面的代码如下:
<%OPTION EXPLICIT%>
<%Server.ScriptTimeOut=5000%>
<!--#include FILE="upload_5xsoft.inc"-->
<html>
<head>
<title></title>
</head>
<body>
<br><hr size=1 noshadow width=300 align=left><br><br>
<%
dim upload,file,formName,formPath,iCount
set upload=new upload_5xsoft
if upload.form("filepath")="" then
set upload=nothing
else
formPath=upload.form("filepath")
if right(formPath,1)<>"\" then formPath=formPath&"\"
end if
iCount=0
for each formName in upload.objForm
response.write "form:" & formName &"=" &upload.form(formName)&"<br>"
next
for each formName in upload.objFile
set file=upload.file(formName)
if file.FileSize>0 then
response.write file.FilePath&file.FileName&" ("&file.FileSize&") => "&formPath&File.FileName&"!<br>"
file.SaveAs formPath&file.FileName
iCount=iCount+1
end if
set file=nothing
next
set upload=nothing
%>
</body>
</html>