دالة VBScript CreateObject
❮ استكمال مرجع VBScriptتنشئ الدالة CreateObject كائنًا من النوع المحدد.
بناء الجملة
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 |
مثال
مثال
إنشاء كائن تعبير عادي:
<%
txt="This is a beautiful day"
Set objReg=CreateObject("vbscript.regexp")
objReg.Pattern="i"
response.write(objReg.Replace(txt,"##"))
%>
ناتج الكود أعلاه سيكون:
Th##s is a beautiful day
❮ استكمال مرجع VBScript