asp实现带刷新功能的验证码代码(2)

需要用得页面用如下方式引用:

验证码:  src="checkcode.asp " alt="验证码,看不清楚?请点击刷新验证码" height="10" style="cursor :
pointer;" onClick="this.src='checkcode.asp?t='+(new Date().getTime());" >

判断页面:

<%
if trim(session("validateCode")) <> trim(Request("txt_check")) then
ErrorMessage = "请输入正确的验证码"
response.write(" <script>alert('"&ErrorMessage&"');location.href='Default.asp' </script>")
response.end
end if
%>

以上所述就是本文的全部内容了,希望大家能够喜欢。