看板 Visual_Basic 關於我們 聯絡資訊
※ 引述《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
shoaming:謝謝~去試看看... 04/14 13:20