一聚教程网:一个值得你收藏的教程网站

热门教程

将VB中的CLASS结合到VBscript中来

时间:2022-06-30 11:20:54 编辑:袖梨 来源:一聚教程网

T LANGUAGE=vbscript RUNAT=Server>
Class clsTest
Private m_strTest
Private Sub Class_Initialize()
m_strTest = "VBScript Programming is fun!"
End Sub
Private Function PrivateTest(strTest)
PrivateTest = strReverse(strTest)
End Function
Public Property Get TestProperty()
TestProperty = m_strTest
End Property
Public Property Let TestProperty(strTest)
m_strTest = strTest
End Property
Public Sub Test()
m_strTest = PrivateTest(m_strTest)
End Sub
End Class
Dim objTest
Set objTest = New clsTest
Response.Write objTest.TestProperty & "
"
objTest.Test
Response.Write objTest.TestProperty & "
"
objTest.TestProperty = "Objects are cool!"
Response.Write objTest.TestProperty & "
"
objTest.Test
Response.Write objTest.TestProperty & "
"
Set objTest = Nothing


热门栏目