关于ajax的调用如何接收返回字符串
<script language= "javascript ">
function makeRequest(url) {
var http_request = false;
var stringaa;
if (window.XMLHttpRequest) { // Mozilla, Safari,...
http_request = new XMLHttpRequest();
if (http_request.overrideMimeType) {
http_request.overrideMimeType( 'text/xml ');
// See note below about this line
}
} else if (window.ActiveXObject) { // IE
try {
http_request = new ActiveXObject( "Msxml2.XMLHTTP ");
} catch (e) {
try {
http_request = new ActiveXObject( "Microsoft.XMLHTTP ");
} catch (e) {}
}
}
if (!http_request) {
alert( 'Giving up :( Cannot create an XMLHTTP instance ');
return false;
}
http_request.onreadystatechange = function() {stringaa = alertContents
(http_request); };
http_request.open( 'GET ', url, true);
http_request.send(null);
return stringaa;
}
function alertContents(http_request) {
if (http_request.readyState == 4) {
&nb