Example Code:
Example code 1 -----
<%
Txt="www.ezer.com"
DomainName=mid(Txt,5)
response.write "Domain Name = "&DomainName
%>
Example code 2 ----------
<%
Txt="link.ezer.com"
DotPlace=instr(Txt,".")
SubName=mid(Txt,1,DotPlace-1)
response.write "Sub Name = "&SubName
%>
--------Ezer Tips ----------
when n start = 1 you will find
mid(Txt,1,DotPlace-1)
same as
left(Txt,DotPlace-1)
DotPlace=instr(Txt,".")
取出第一个点位置=5
5-1=DotPlace-1=指定长度
------- tips --------
mid 与 left 有似可有相辅的功能
|