javascript - AJAX ReadyState 4 Status 200 but responseText undefined -


i have html , php file:

test.html:

var req = new xmlhttprequest(); req.onreadystatechange = function() {     if (req.readystate==4 && req.status == 200) {       var dat = req.reponsetext;       alert("status text: " + req.statustext);       alert("response: " + dat);     }   };  req.open("get", "info.php", true); req.send(); 

and info.php:

<?php echo "test"; ?> 

accessing info.php shows "test" expected, responsetext ajax request undefined. missing here?

typo typo typo

var dat = req.reponsetext;                ^^^ 

Comments

Popular posts from this blog

php - Zend Framework / Skeleton-Application / Composer install issue -

c# - Better 64-bit byte array hash -

python - PyCharm Type error Message -