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 အကိုးအကားကို အပြီးသတ်ပါ။