ဗိုဘက်စ် အမှတ်ပေါင်း လုပ်ငန်း
定义和用法
Mid 函数可从字符串中返回指定数目的字符。
提示:请使用 Len 函数来确定字符串中的字符数目。
语法
Mid(string,start[,length])
参数 | 描述 |
---|---|
string | 必需的。从其中返回字符的字符串表达式。如果字符串包含 Null,则返回 Null。 |
start | 必需的。规定起始位置。如果设置为大于字符串中的字符数目,则返回空字符串("")。 |
length | လုံးဝ သို့မဟုတ် အရာခံ ပြင်းအား။ အရာခံ သို့မဟုတ် length အားဖြင့် စာတု အချင်းအတွင်း အချင်းချင်း အကျဉ်းချုပ် များ ကို ပြန်လည်ပေးသည်။ |
အမှတ်
အမှတ် 1 လုပ်ငန်း
dim txt txt="This is a beautiful day!" document.write(Mid(txt,1,1))
ထုတ်လုပ်ခြင်း:
T
အမှတ် 2 လုပ်ငန်း
dim txt txt="This is a beautiful day!" document.write(Mid(txt,1,11))
ထုတ်လုပ်ခြင်း:
This is a b
အမှတ် 3 လုပ်ငန်း
dim txt txt="This is a beautiful day!" document.write(Mid(txt,1))
ထုတ်လုပ်ခြင်း:
This is a beautiful day!
အမှတ် 4 လုပ်ငန်း
dim txt txt="This is a beautiful day!" document.write(Mid(txt,10))
ထုတ်လုပ်ခြင်း:
လူငယ် သတ္တု နေ့!