#12001/11/1 13:15:15
谁能将这段VBScript代码转换成javascript代码。拜托:(另外:For each是什么意思啊)
<%
Dim mySmartUpload, item, value, file
' 先如下创建组件
Set mySmartUpload = Server.CreateObject("aspSmartUpload.SmartUpload")
mySmartUpload.Upload
' 用 For Each 循环获取 From表单中每一项的值
For each item In mySmartUpload.Form
For each value In mySmartUpload.Form(item)
Response.Write(item & " = " & value & "
")
Next
Next
Response.Write "
"
' 上传文件数据
' Response.Write("文件数目 =" & mySmartUpload.Files.Count &"
")
Response.Write("总字节 = " & mySmartUpload.Files.TotalBytes &" bytes
")
Response.Write("文件清单: " & "
")
' 对每一个文件 - 还有更简单的方法, 见wuf33.asp
For each file In mySmartUpload.Files
If not file.IsMissing Then
'以原来的文件名存于 C:\temp 下
file.SaveAs("c:\temp\" & file.FileName)
Response.Write(file.FileName & " (" & file.Size & "bytes)
")
End If
Next
Set mySmartUpload = Nothing
%>