如何把服务端javascritp转换成vbscript,救急

bscer 2005-05-19 09:30:51
我网上找了

<SCRIPT RUNAT=SERVER LANGUAGE=JSCRIPT>
//The function creates Field object.
function CreateUploadField(){ return new uf_Init() }
function uf_Init(){
this.Name = null
this.ContentDisposition = null
this.FileName = null
this.FilePath = null
this.ContentType = null
this.Value = null
this.Length = null
}

</SCRIPT>

想把他专成vbscript
急用
主要是我是asp初学者,现在时间紧迫,没有办法
...全文
77 6 打赏 收藏 转发到动态 举报
写回复
用AI写文章
6 条回复
切换为时间正序
请发表友善的回复…
发表回复
zhengli1999 2005-05-20
  • 打赏
  • 举报
回复
Private Sub uf_Init()
uf_Init()要为public
或者
Public function CreateUploadField()
uf_Init()
end function
Private function uf_Init()
Name = null
ContentDisposition = null
FileName = null
FilePath = null
ContentType = null
Value = null
Length = null
end function
外部调用
Set Field =new FieldNode
Field.CreateUploadField()
zhengli1999 2005-05-20
  • 打赏
  • 举报
回复
直接Field.uf_Init()就可以了
bscer 2005-05-19
  • 打赏
  • 举报
回复
Class FieldNode
Public Name
Public ContentDisposition
Public FileName
Public FilePath
Public ContentType
Public Value
Public Length


Private Sub uf_Init()
Name = null
ContentDisposition = null
FileName = null
FilePath = null
ContentType = null
Value = null
Length = null
End Sub
End Class

但是不知道如何调用里头的
Set Field =new FieldNode

call sub Field.uf_Init()

call那句是肯定错了 不知道如何写
bscer 2005-05-19
  • 打赏
  • 举报
回复
就是如何创建一个对象 这个对象包含name,path等内容?救急
bscer 2005-05-19
  • 打赏
  • 举报
回复
function CreateUploadField()
uf_Init()
end function

这样可能不行,fun要求返回一个object,我不清楚 vbscript里头是否有new操作
function CreateUploadField()
CreateUploadField=uf_Init()
end function


zhengli1999 2005-05-19
  • 打赏
  • 举报
回复
<SCRIPT RUNAT=SERVER LANGUAGE=VBSCRIPT>
'The function creates Field object.
dim Name
dim contentDisposition
dim filename
dim filepath
dim contenttype
dim value
dim length
function CreateUploadField()
uf_Init()
end function
function uf_Init()
Name = null
ContentDisposition = null
FileName = null
FilePath = null
ContentType = null
Value = null
Length = null
end function

</SCRIPT>

28,406

社区成员

发帖
与我相关
我的任务
社区描述
ASP即Active Server Pages,是Microsoft公司开发的服务器端脚本环境。
社区管理员
  • ASP
  • 无·法
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧