注册 登录
编程论坛 ASP技术论坛

[求助]用vbscript怎么实现javascript的功能?

tianyu123 发布于 2007-10-16 12:33, 477 次点击

<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>

像上面javascript代码实现的功能,实现同样功能用vbscript怎么写?

2 回复
#2
tianyu1232007-10-16 12:37

关键是javascript中有个 this 是指当前的意思

那么vbscript有没有这样的功能呢?
#3
yeshirow2007-10-16 15:37
有一個 Me 是類似的, 不過只在自定義類中使用

Class IClass
Private m_X

Public Property Get X()
X = Me.m_X ' 可以使用 Me, 也可以不用, Me 表示當前對象
End Property

Public Property Let X(ByVal m_X)
Me.m_X = m_X ' 使用 Me 指示以避免混淆, 當前不應該使用 m_x
End Property
End Class
1