给你一段代码,过滤输入特殊符号,保治百病(:)

80酷酷网    80kuku.com

     function eck(str)
    rem 检查过滤所有的输入
    dim dist
    dist=replace(str,"'","''")
    dist=replace(dist,"<","<")
    dist=replace(dist,">",">")
    dist=replace(dist,"chr(60)","<")
    dist=replace(dist,"chr(37)",">")
    dist=replace(dist,"""",""")
    dist=replace(dist,";",";;")
    eck=dist
   end function


sub showBody(Str)'多行文本显示函数
    str=replace(str,chr(13),"
" & chr(13)+chr(10))
    str=replace(str,chr(32)," ")
    response.write str
end sub

分享到
  • 微信分享
  • 新浪微博
  • QQ好友
  • QQ空间
点击: