% '判断是否按下了确定按钮,如果按下了,则对比验证码是否输入正确 If Request.QueryString("submit") > "" Then Dim checkCode checkCode = Trim(Request.QueryString("checkCode")) If checkCode = Session("psn") Then Response.Write("script>alert('验证码正确');/script>") Else Response.Write("script>alert('验证码错误');/script>") End If End If %> form action="test.asp" method="get"> input type="text" name="checkCode" /> img src="code.asp" /> input type="submit" name="submit" value="确定"> /form>