<% ''聲明一個名為aspcn的類 Class aspcn Private aspcn ''初始化類 Private Sub Class_Initialize aspcn="Aspcn Is Good!<br>" End Sub ''定義一個函數 Public Function DoIt() DoIt=aspcn End Function ''定義一個方法 Public Sub QueryStr(stat) Response.write stat End Sub
End Class
Set Hi_aspcn=New aspcn ''定義一個名為Hi_aspcn的aspcn對象實例 response.write Hi_aspcn.DoIt varstr="Aspcn Is Cool!<br><font color=red>http://www.aspcn.com</font><br>WelCome!!!" Hi_aspcn.QueryStr varstr