一聚教程网:一个值得你收藏的教程网站

最新下载

热门教程

asp安全检测函数

时间:2008-05-16 编辑:简简单单 来源:一聚教程网

今天在做会员注册检验的时候用了太多的检测字符


突然想起是不是做个函数调用方便点

。。。。


函数不知道写的严谨不

望各位高手指点,多多给点意见哈

<%
function closename(fmname)
  Dim closekey,closekeyl,closekeyi
  '下面是要过滤的字符
  closekey="'|`|~|!|*|;|^|?|$|%|&|(|)|<|>|and|or|script|onClick|onload|exec|insert|select|delete|update|count|chr|mid|master|truncate|char|declare"
  closekeyl=Split(closekey,"|") '分割|取得禁用字符
  for closekeyi=0 to Ubound(closekeyl)
  if Instr(fmname,closekeyl(closekeyi))>0 then
  Response.Write ""
  response.end
  end if
next
end function

热门栏目