asp中mid left right 函数怎么用?

asp中mid left right 函数怎么用?
2025-04-20 02:36:24
推荐回答(1个)
回答1:

准确点说是VBScript嚅的Mid, Left 和 Right函数.
<%
Dim str = "一二三四五"
Response.Write Mid(str, 3) '从str的第3个字符开始截取到最后
Response.Write Mid(str, 3, 2) '从str的第3个字符开始截取之后的2个字符
Response.Write Left(str, 3) '截取str的前三个字符
Response.Write Right(str, 3) '截取str的后三个字符
%>