经典ASP获取文本框值-使用VBScript
我正在尝试将文件上载到我的服务器。文件正在上载,但我想获取File1文本框中的值。我不需要路径,我只需要保存的文件名经典ASP获取文本框值-使用VBScript,vbscript,asp-classic,Vbscript,Asp Classic,我正在尝试将文件上载到我的服务器。文件正在上载,但我想获取File1文本框中的值。我不需要路径,我只需要保存的文件名 <html> <head> <title>File Upload</title> </head> <body> <form name="uploadr" method="post" action="" enctype="multipart/form-data">
<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>
文件上传
文件1:
我有以下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.uploader.hiddenVal.value())
时,它会说“document”变量未定义
要获取文本框的值,我需要做什么?尝试以下操作:
response.write(UploadFormRequest(“hiddenVal”)
尝试以下操作:
response.write(UploadFormRequest(“hiddenVal”))