欧美bbbwbbbw肥妇,免费乱码人妻系列日韩,一级黄片

VBScript Mid 函數(shù)

定義和用法

Mid 函數(shù)可從字符串中返回指定數(shù)目的字符。

提示:請使用 Len 函數(shù)來確定字符串中的字符數(shù)目。

語法

Mid(string,start[,length])
參數(shù) 描述
string 必需的。從其中返回字符的字符串表達式。如果字符串包含 Null,則返回 Null。
start 必需的。規(guī)定起始位置。如果設置為大于字符串中的字符數(shù)目,則返回空字符串("")。
length 可選的。要返回的字符數(shù)目。如果省略或 length 超過文本的字符數(shù)(包括 start 處的字符),將返回字符串中從 start 到字符串結束的所有字符。

實例

例子 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))

輸出:

beautiful day!