1 string a="验证码字符串" 2 string b="要输入的字符串"; 3 if (a.Equals(b, StringComparison.OrdinalIgnoreCase)) 4 { 5 Response.Write("<script>alert('验证码输入成功')</script>"); 6 } 7 else 8 { 9 Response.Write("<script>alert('验证码输入失败')</script>");10 }