AJAX编码中的可变代码

i found a code fore an ajax tutorial,and am not familiar with some part of the code there

ajaxRequest.onreadystatechange = function(){
        if(ajaxRequest.readyState == 4){
            document.myForm.time.value = ajaxRequest.responseText;
        }
    }
    ajaxRequest.open("GET", "pay.php", true);
    ajaxRequest.send(null); 

can someone please tell me what the above code means,are there any variables,etc? I am aware that pay.php is the php file it reffers to,but what does the first three line of coding mean?

The XMLHttpRequest object has a property called readyState. This is where the status of your server's response is stored. The response can be processing, downloading or completed. Each time the readyState changes then our onreadystatechange function executes.

When the property readyState is 4 that means the response is complete and you can get your data.

The function refers to a textbox named time,in a form named myform"The value is taken from the code in pay.php file.