ASPÀàµÄ¶¨Òå
ASPÀà
£½£½£½£½£½£½£½£½£½
ʹÓÃVBSµÄASPÒ²Äܶ¨ÒåÀàµÄ£¡±¾ÎĽ«½éÉܶ¨Ò塢ʹÓÃÀàµÄ»ù±¾·½·¨¡£
ÔÚASP£¨ÌØָʹÓÃVBSµÄASP£¬ÏÂͬ£©ÀʹÓÃClassÓï¾äÀ´ÉùÃ÷Ò»¸öÀà¡£Óï·¨ÈçÏ£º
Class ˈ̞
End Class
ÀàµÄ¶¨Òå¡¢±äÁ¿¡¢ÊôÐԺͷ½·¨µÈ¶¼°üº¬ÔÚClass...End Class¿éÖС£
ÏÂÃæ¾Í¿ÉÒÔ¶¨ÒåÀàµÄÊôÐԺͷ½·¨ÁË¡£Õýʽ½²ÊôÐÔ¡¢·½·¨µÄ¶¨Òå֮ǰ£¬ÓÐÒ»µã±ØÐëÁ˽⣺
ÔÚ Class ¿éÖУ¬³ÉԱͨ¹ýÏàÓ¦µÄÉùÃ÷Óï¾ä±»ÉùÃ÷Ϊ Private »ò Public¡£±»ÉùÃ÷Ϊ Privat
e µÄ½«Ö»ÔÚ Class ¿éÄÚÊǿɼûµÄ¡£±»ÉùÃ÷Ϊ Public ²»½öÔÚ Class ¿éµÄÄÚ²¿ÊǿɼûµÄ£¬¶Ô
Class ¿éÖ®ÍâµÄ´úÂëÒ²ÊǿɼûµÄ¡£Ã»ÓÐʹÓà Private »ò Public Ã÷È·ÉùÃ÷µÄ±»Ä¬ÈÏΪ Pub
lic¡£ ÔÚÀàµÄ¿éÄÚ²¿±»ÉùÃ÷Ϊ Public µÄ¹ý³Ì (Sub »ò Function)½«³ÉΪÀàµÄ·½·¨£¬Public
±äÁ¿½«³ÉΪÀàµÄÊôÐÔ¡££¨Õª×ÔMS VBS²Î¿¼£©
ÏÖÔÚ£¬ÎÒÃÇÀ´¶¨Òå¸ö×ÔÐгµµÄÀࣺ
Class bike
End Class
ÕâÑù£¬¾ÍÉùÃ÷ÁËÒ»¸öÃûΪbikeµÄÀà¡£²»¹ý£¬ËüÏÖÔÚʲô¶¼²»ÄÜ×ö¡£ÒªÈÃËüÄÜ×öµãʲô£¬µÃÍù
ÀïÃæ¼ÓЩ¶«Î÷¡£
Ò»¡¢Ë½ÓбäÁ¿
ΪÁ˽»»»Êý¾ÝµÈ²Ù×÷£¬ÎÒÃÇ¿ÉÒÔÉùÃ÷һЩClassÄÚ²¿µÄ˽ÓбäÁ¿¡£¹ËÃû˼Ò壬˽ÓбäÁ¿Ö»ÄÜÔÚ
Class¿éÖпɼû£¬ÍⲿÊÇÎÞ·¨·ÃÎʵġ£ÉùÃ÷˽ÓбäÁ¿µÄÓï·¨ÊÇ£º
Private ±äÁ¿Ãû
Àý£ºPrivate bikename 'ÉùÃ÷ÁËÒ»¸öÃûΪbikenameµÄ˽ÓбäÁ¿
ÏÖÔÚ£¬ÎÒÃÇÀ´ÍêÉÆÒ»ÏÂbikeÀࣺ
Class bike
'***ÒÔÏÂËĸö±äÁ¿½öÔÚ±¾ÀàÄڿɼû****
Private bikename '³µÃû
Private bikemodel 'ÐͺÅ
Private bikedate '³ö³§ÈÕÆÚ
Private bikespeed 'ËÙ¶È
End Class
¶þ¡¢·½·¨£º
Ö®ËùÒÔÏȽ²·½·¨£¬ÊÇÒòΪ¶¨Òå·½·¨¶ÔÓÚ´ó¼ÒÀ´ËµÏà¶ÔÊìϤ¡£·½·¨¿ÉÒÔ¿´×÷ÊǺ¯Êý£¬ÔÚVBSÀï¿É
ÒÔʹÓÃSubºÍFunctionÀ´¶¨Ò庯Êý£¨Í¨³£°ÑSUB¶¨Òå¿é½Ð“¹ý³Ì”£©£¬ËùÒÔ£¬¶¨Òå·½·¨ºÍ¶¨Òå
º¯Êý£¨¹ý³Ì£©µÄÓï·¨Ò»Ñù££Ö»Òª¼ÓÉϸöPublic¾Í¿ÉÒÔÁË££µ±È»£¬ÉÏÃæÒѾ˵ÁË£¬Class¿é
ÖÐĬÈϾÍÊÇPublic£¬ËùÒÔ¿ÉÒÔÊ¡ÂÔ²»Ð´£º
Public Sub ·½·¨Ãû(²ÎÊý)
'·½·¨´¦Àí´úÂë
End Sub
»ò
Public Function ·½·¨Ãû(²ÎÊý)
'·½·¨´¦Àí´úÂë
End Function
£¨ÖÁÓÚʲôʱºòÓÃSubʲôʱºòÓÃFunction²¢Ã»¹æ¶¨£¬²»¹ý£¬Ò»°ã£¬ÒªÇó·½·¨·µ»ØÒ»¸öÖµ¾ÍÒª
Óõ½Function£¬·ñÔò¾ÍÓÃSub¡££©
Ò»¸ö¼òµ¥µÄÀý×Ó£º
Public Sub speedUp() '¼ÓËÙ
bikespeed = bikespeed + 1
End Sub
Èç´Ë£¬ÎÒÃǵÄbikeÀà¾ÍÓÐÁËÒ»¸ö¼ÓËٵŦÄÜ£¬Í¨¹ýËü£¬ÄÜʹ×ÔÐгµµÄËÙ¶ÈϽµ1
Èý¡¢ÊôÐÔ
ÓÐÁ½ÖÖ·½Ê½
Ïà¹ØÎĵµ£º
<%
Option Explicit
'Êý¾Ý¿â½á¹¹£º
'location
'±í1 loaction ËùÔÚµÄÊÐ ±í
' ×Ö¶Î
' loactionid £¨Ö÷¼ü£©
' loactionname Ãû×Ö
'±í2 district ËùÔÚµÄÏØ ±í
' ×Ö¶Î
' locationid £¨Ö÷¼ü£©
' districtid
'&n ......
ASPÓëActiveX¿Ø¼þ½»»¥ÊµÕ½(Ò»)
¹Ø¼ü×Ö:ASP,ActiveX¿Ø¼þ,Êý×ÖÇ©Ãû,°²È«
ActiveX¿Ø¼þÔËÐÐÔÚ¿Í»§¶Ë¡£ÎÒÃÇ¿ÉÒÔ»ñµÃ¿Í»§¶ËµÄһЩÐÅÏ¢£¬ÈçIC¿¨µÄÐÅÏ¢,¿Í»§¶ËµÄÑéÖ¤µÈµÈ¡£µ«ÊÇActiveX¿Ø¼þÒ²ÓÐÐí¶àȱµã£º¿Í»§¶ËµÄ²¿ÊðºÜÀ§ÄÑ£¬Èç¿Í»§¶Ë²»ÄÜÕýÈ·ÏÂÔØ£¬ÏÂÔØÁË ......
¿Í»§¶Ë½Å±¾£º<script language="scriptlanguage"></script>
·þÎñÆ÷¶Ë½Å±¾£º<% ......%>
VbscriptÊÇvisual basicµÄÒ»¸ö×Ó¼¯£¬ËäÈ»ÏÞÖÆÁË¿ÉÒÔʹÓõÄÄÚÖú¯ÊýµÄÊýÁ¿£¬µ«ÊÇҲʹµÃËû·Ç³£Ð¡ÇÉ£¬´Ó¶øÌá¸ßÁË¿ÉÒÆÖ²ÐÔ
VariantÊÇvbscriptµÄΨһÊý¾ÝÀàÐÍ£¬ÓÐ13ÖÖ×ÓÀàÐÍ£º
Empty,Null,Boolean,Byte,Integer,Curre ......
Array()
¡¡¡¡FUNCTION: ·µ»ØÒ»¸öÊý×é
¡¡¡¡SYNTAX: Array(list)
¡¡¡¡ARGUMENTS: ×Ö·û£¬Êý×Ö¾ù¿É
¡¡¡¡EXAMPLE: <%
¡¡¡¡Dim myArray()
¡¡¡¡For i = 1 to 7
¡¡¡¡Redim Preserve myArray(i)
¡¡¡¡myArray(i) = WeekdayName(i)
¡¡¡¡Next
¡¡¡¡%[/IMG]
¡¡¡¡RESULT: ½¨Á¢ÁËÒ»¸ö°üº¬7¸öÔªËصÄÊý×émyArray
¡ ......