xmlhttp.open("GET",?"default.aspx",?true);
xmlhttp.onreadystatechange=function()
{
if(xmlhttp.readyState==4)
{
alert(xmlhttp.responseText);
}
}
xmlhttp.send(null);
用DELPHI怎么写呢?关键是这句xmlhttp.onreadystatechange=function(),是什么意思呢?DELPHI应该怎么写?
拜托了,各位老大。
xmlhttp.onreadystatechange=function()
{
if(xmlhttp.readyState==4)
{
alert(xmlhttp.responseText);
}
}
xmlhttp.send(null);
用DELPHI怎么写呢?关键是这句xmlhttp.onreadystatechange=function(),是什么意思呢?DELPHI应该怎么写?
拜托了,各位老大。
function()
{
if(xmlhttp.readyState==4)
{
alert(xmlhttp.responseText);
}
}
再给xmlhttp.onreadystatechange赋值xmlhttp.onreadystatechange=function()。当xmlhttp.readyState改变时就回调用回调函数进行处理
str : string;
begin
str := idhttp1.get('');
ShowMessage(str);
end;是一样的。你在 get 的时候是无法异步的。