Please tell me why I can not display the variable a?

xmlh=new XMLHttpRequest(); xmlh.onreadystatechange = function() { if (xmlh.readyState==4 && xmlh.status==200) { alert(a); } } xmlh.open('GET','first.php?a=22',true); xmlh.send(); 

how to do it?

    1 answer 1

     xmlh.onreadystatechange = function ( data ) { if ( xmlh.readyState == 4 && xmlh.status == 200 ) { alert( data ); } }