ReferenceError: xmlhttp is not defined
ReferenceError: xmlhttp is not defined
我的AJAX不工作,我不知道为什么。我错过了什么??
ReferenceError:xmlhttp未定义@javascript.js:5
function insapts(pin){
if (window.XMLHttpRequest){ xmlhttpp=new XMLHttpRequest(); }else{ xmlhttpp=new ActiveXObject("Microsoft.XMLHTTP"); }
xmlhttpp.onreadystatechange=function(){
if(xmlhttpp.readyState==4 && xmlhttpp.status==200){
document.getElementById('apttimeins').innerHTML = xmlhttp.responseText;
}
}
var url = "bridge3.php?pin="+pin;
xmlhttpp.open("GET",url,false);
xmlhttpp.send(null);
}
您有一个打字错误。XMLHttpRequest
对象是用局部变量名xmlhttpp
创建的。
更改
xmlhttp.responseText;
至
xmlhttpp.responseText;
// ^ missing p
相关文章:
- reactRedux is not defined
- ReferenceError: not defined
- ReferenceError: cordova is not defined @ng-cordova.min.js:7
- jQuery is not defined - WordPress footer.php
- GAPI Is Not Defined
- Page_ClientValidate is not defined
- ReferenceError: $firebase is not defined
- ReferenceError: crimeID is not defined
- AngularJS: $scope is not defined?
- ajaxUrl is not defined
- WebView: Uncaught ReferenceError: Android is not defined
- ReferenceError SetInterval not defined
- ReferenceError: yes is not defined
- ReferenceError "not defined"
- Soundcloud API ReferenceError: $ is not defined (JavaScript)
- Angular: Compile is not defined
- nodeJS phantom ReferenceError: Promise is not defined
- observableArray is not defined
- Uncaught ReferenceError trapArea/Per is not defined
- ReferenceError: xmlhttp is not defined