我正在尝试将文件上传到我的服务器。该文件正在上传,但我想获取File1文本框中的值。我不想要路径,我只想要保存的文件名。
<html>
<head>
<title>File Upload</title>
</head>
<body>
<form name="uploadr" method="post" action="" enctype="multipart/form-data">
File 1 : <input name="File1" type="file"/><br/><br/>
<input name="btnSubmit" type="submit" value="Upload files >>" /><br/>
<input name="hiddenVal" type="hidden" value="testVal" />
</form>
</body>
</html>
我有以下VBScript:
<%
Server.ScriptTimeout = 2000
Form.SizeLimit = &H100000
If Form.State = 0 Then 'Completed
Form.Files.Save DestinationPath
response.write "<br><Font Color=green>File (" & Form.TotalBytes \1024 & "kB) was saved to " & DestinationPath & " folder.</Font>"
response.write(document.uploadr.hiddenVal.value())
ElseIf Form.State > 10 then
Const fsSizeLimit = &HD
Select case Form.State
case fsSizeLimit: response.write "<br><Font Color=red>Source form size (" & Form.TotalBytes & "B) exceeds form limit (" & Form.SizeLimit & "B)</Font><br>"
case else response.write "<br><Font Color=red>Some form error.</Font><br>"
end Select
End If'Form.State = 0 then
%>
当它到达response.write(document.uploadr.hiddenVal.value())
时,它说'Document'变量未定义。
我需要做些什么来获取文本框的值?
答案 0 :(得分:1)
试试这个:
response.write(UploadFormRequest("hiddenVal"))