वीबीस्क्रिप्ट क्रिएटऑब्जेक्ट फंक्शन
❮ पूर्ण वीबीस्क्रिप्ट संदर्भ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
❮ पूर्ण वीबीस्क्रिप्ट संदर्भ