VBScript CreateObject- funksie
❮ Voltooi VBScript-verwysingDie CreateObject-funksie skep 'n voorwerp van 'n gespesifiseerde tipe.
Sintaksis
CreateObject(servername.typename[,location])
Parameter | Description |
---|---|
servername | Required. The name of the application that provides the object |
typename | Required. The type/class of the object |
location | Optional. Where to create the object |
Voorbeeld
Voorbeeld
Skep 'n gereelde uitdrukking voorwerp:
<%
txt="This is a beautiful day"
Set objReg=CreateObject("vbscript.regexp")
objReg.Pattern="i"
response.write(objReg.Replace(txt,"##"))
%>
Die afvoer van die kode hierbo sal wees:
Th##s is a beautiful day
❮ Voltooi VBScript-verwysing