PHP (20140516)
2020-12-13 04:43
标签:style blog class code c java 用Ajax验证验证码: PHP (20140516),搜素材,soscw.com PHP (20140516) 标签:style blog class code c java 原文地址:http://www.cnblogs.com/sunshine-c/p/3733290.html 1 var xmlHttp;
2 function getXmlHttp(){
3 if(window.ActiveXObject){
4 xmlHttp = new ActiveXObject("MICROSOFT.XMLHTTP");
5 }else if(window.XMLHttpRequest){
6 xmlHttp = new XMLHttpRequest();
7 }
8 }
9
10 function checkYZM(){
11
12
13 getXmlHttp();
14 var f = false;
15 xmlHttp.open("GET","checkYZM.php?yzm="+yzm.value,false);
16 xmlHttp.onreadystatechange = function(){
17 if(xmlHttp.readyState == 4){
18 if(xmlHttp.status == 200){
19 var str = parseInt(xmlHttp.responseText);
20 if(str){
21 yzmCheck.innerHTML = "验证成功!";
22 f = true;
23 }else{
24 yzmCheck.innerHTML = "验证失败!";
25 f = false;
26 }
27 }
28 }
29 }
30 xmlHttp.send(null);
31 return f;
32
33 }
上一篇:Java中注解学习系列教程-2
下一篇:Error pulling origin: error: Your local changes to the following files would be overwritten by merge