?? test.htm
字號:
<HTML>
<HEAD>
<META NAME="GENERATOR" Content="Microsoft Visual Studio 6.0">
<TITLE></TITLE>
</HEAD>
<BODY>
<script language="VBScript">
'從完整路徑中獲得純文件名
public function fnGetFilename(sfull)
if sfull="" or instr(1,sfull,".")=0 then
fnGetFilename=false
else
dim pos
do until instr(1,sfull,"/")=0
pos=instr(1,sfull,"/")
sfull=right(sfull,len(sfull)-pos)
loop
fnGetFilename=sfull
end if
end function
public function fnGetSrc(fulltag)
dim spos
spos=instr(fulltag,"src")
if spos<>0 then
endpos=instr(spos+5,fulltag," ")
fnGetSrc=mid(fulltag,spos+5,endpos-spos-6)
else
fnGetSrc=false
end if
end function
public function fnGetSrc_verA(fulltag)
dim spos
spos=instr(fulltag,"src")
if spos<>0 then
pos1=instr(spos+3,fulltag,"'")
pos2=instr(pos1+1,fulltag,"'")
if pos1<>0 and pos2<>0 then
fnGetSrc=mid(fulltag,pos1+1,pos2-pos1-1)
else
fnGetSrc=false
end if
else
fnGetSrc=false
end if
end function
public function fnGetTag(str,tagname)
dim pos,endpos
str=lcase(str)
pos=instr(str,"<"+tagname)
if pos<>0 then
endpos=instr(pos,str,">")
fnGetTag=mid(str,pos,endpos-pos+1)
else
fnGetTag=false
end if
end function
s="<td><rt>fsdfsdfsdfsd<rw>34</34></tr><IMG id=97549 alt='' src='file:///C:/Documents%20and%20Settings/Administrator/Desktop/pageDesign/PageDesign_v2/images/mytoolbar.gif' align=baseline border=0><sdf>sdf<sdf><sdf><sdf>"
a=fnGetTag(s,"img")
b=fnGetSrc(a)
'c=fnGetFilename(b)
msgbox(a)
msgbox(b)
msgbox(c)
</script>
<span id=sys></span><br>
<input type="button" value=test onclick="vbscript:sys.innerHTML=fnGetFilename('c:\windows\inner html\scripts\test\qq\dr\css.css')">
<br>
</BODY>
</HTML>
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -