作者bennylu (Benny)
看板Visual_Basic
标题Re: [ASP ] 请问一个切HTML tag的问题
时间Fri Apr 14 01:52:26 2006
※ 引述《shoaming (修明)》之铭言:
: 想请问一下有没有function或是object可以使用
: 将HTML的tag切掉
: ex:
: <td>这是一个测试档</td>
: 结果:这是一个测试档
Function ClearHTML(orgstr)
str = orgstr
tmp = ""
flag = 1
While instr(str,"<") > 0 and instr(str,">") > 0
startindex = instr(flag,str,"<")
if startindex > 0 then
endindex = instr(startindex,str,">")
flag = endindex + 1
else
flag = startindex + 1
end if
if startindex > 0 and endindex > 0 then
tmp = mid(str,startindex,endindex - startindex + 1)
end if
str = replace(str,tmp,"")
startindex = 0
endindex = 0
tmp = ""
Wend
ClearHTML = str
End Function
response.write ClearHTML(your_code)
--
※ 发信站: 批踢踢实业坊(ptt.cc)
◆ From: 140.128.194.78
1F:推 shoaming:谢谢~去试看看... 04/14 13:20