17 November, 2005

VBScript Properties

0 Comments

Written by Jason Davies Topics: VBScript

This section focuses on how to set properties for different objects and controls. This is perhaps one of the simplest tasks to do in VBScript. The general syntax for doing this is:

<script>
...
ObjectName.property = value
...
</script>

ObjectName is the name or identity of your object specified by the id attribute, and property is a specific property for the object. value is the value that the property is set to. Consider this code listing which shows you how to do a simple rollover in VBScript:

<html>
    <head>
        <script language="VBScript">
        <!--
            sub Image1_OnMouseOver
                Image1.src = "2.gif"
            end sub

            sub Image1_OnMouseOut
                Image1.src = "1.gif"
            end sub
        '-->
        </script>
    </head>
    <body>
        <img name="Image1" src="1.gif" />
    </body>
</html>

And this is the effect of the code:

VBScript button

0 Responses to “VBScript Properties”

Leave a Comment

:
: