Re: [ASP ] 請問一個切HTML tag的問題
※ 引述《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
推
04/14 13:20, , 1F
04/14 13:20, 1F
討論串 (同標題文章)
本文引述了以下文章的的內容:
完整討論串 (本文為第 2 之 2 篇):
Visual_Basic 近期熱門文章
PTT數位生活區 即時熱門文章