Working with objects in VBScript
Working with objects
Whether you are using a ActiveX® control (formerly known as an OLE control) or a Java (TM) object, Microsoft Visual Basic scripting Edition and microsoft®internet Explorer have the same Way to deal with them. If you are using Internet Explorer and you have a Label control installed, you will see a page made from the following code.
The <OBJECT> tag is used to contain the initial value of the object,<param> tag used to set the property of the object. If you are a Visual basic programmer, you will find that using the <PARAM> tag is similar to setting the initial property value of a form control in Visual Basic. For example, the following code adds an ActiveX Label control to a page using the <OBJECT> and <PARAM> tags:
<object
Classid= "CLSID:99B42120-6EC7-11CF-A6C7-00AA00A47DD2"
Id=lblactivelbl
width=250
height=250
Align=left
Hspace=20
Vspace=0
>
<param name= "Angle" value= ">"
<param name= "Alignment" value= "4" >
<param name= "BackStyle" value= "0" >
<param name= "Caption" value= "a simple Tag" >
<param name= "FontName" value= "Song Body" >
<param name= "fontsize" value= ">"
<param name= "FontBold" value= "1" >
<param name= "Frcolor" value= "0" >
</OBJECT>
As with any form control, you can get properties, set properties, and Invoke methods. For example, the following code contains a <FORM> control that can be used to manipulate two properties of a Label control:
<form name= "Labelcontrols" >
<input type= "TEXT" name= "Txtnewtext" class= ' 9v ' 5>
<input type= "button" Name= "Cmdchangeit" value= "Change Text" >
<input type= "button" Name= "cmdrotate" value= "rotate label" >
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.