Re: [ASP ] 請問一個切HTML tag的問題

看板Visual_Basic作者 (Benny)時間19年前 (2006/04/14 01:51), 編輯推噓1(100)
留言1則, 1人參與, 最新討論串2/2 (看更多)
※ 引述《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
文章代碼(AID): #14Fe-LRr (Visual_Basic)
討論串 (同標題文章)
文章代碼(AID): #14Fe-LRr (Visual_Basic)