加入收藏 | 设为首页 | 会员中心 | 我要投稿 应用网_镇江站长网 (https://www.0511zz.com/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 站长学院 > MySql教程 > 正文

如何编写一个过滤掉HTML代码的函数?

发布时间:2016-11-29 17:36:12 所属栏目:MySql教程 来源:网络整理
导读:如何编写一个过滤掉HTML代码的函数? lt;% Function Filterhtml(strToFilter) nbsp; Dim strTemp nbsp; strTemp = strToFilter nbsp; While Instr(1,strTemp,"lt;") AND Instr(1, strTemp, "gt;") nbsp; nbsp; strTemp = Left(strTemp, Instr(1, strTemp,

如何编写一个过滤掉HTML代码的函数?

lt;%
Function Filterhtml(strToFilter)
nbsp; Dim strTemp
nbsp; strTemp = strToFilter
nbsp; While Instr(1,strTemp,"lt;") AND Instr(1, strTemp, "gt;")
nbsp; nbsp; strTemp = Left(strTemp, Instr(1, strTemp, "lt;")-1) Right(strTemp, Len(strTemp)-Instr(1,strTemp, "gt;"))
nbsp; WEnd
nbsp; Filterhtml = strTemp
End Function
%gt;

(编辑:应用网_镇江站长网)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!