Who can explain this ajax code for me [closed]

If i am not wrong, it will listen to the button and in the var xmlhttp; makes the request.
xmlhttp.readyState==4 && xmlhttp.status==200 check if request finished and response is ready and == 200 see if status is “OK”. if all is true in the if condition goes to the div with id “myDiv” and makes and append to with the request from this. The request is just the content from the file ajax_info.txt.

Hope it helps and you will understand 🙂

Leave a Comment