ASP中限制某些字符留言评论
更新时间:2014年07月17日 10:22:42 投稿:mdxy-dxy
这篇文章主要介绍了ASP中限制某些字符留言评论,原理就是通过instr函数查找。感觉很简单,写起来还是有点手生,感觉阿会南
Sub CheckCanSubmit(str)
Dim connt,connts
connt="免费电影,安利,http,www,<a"
connts = split(connt,",")
For each glword in connts
if instr(str,glword)<>0 then
Response.Write("<script>alert('操作非法');window.history.go(-1);</script>")
Response.End()
end if
next
End Sub相关文章
在asp中使用js的encodeURIComponent方法
encodeURIComponent 方法返回一个已编码的 URI。如果您将编码结果传递给 decodeURIComponent,那么将返回初始的字符串2012-03-03


最新评论