function hello()
{
var request = getXHR();
request.open("GET","A?value="+document.getElementById('a').value+"",true);
request.send(null);
request.onreadystatechange=function()
{
if(request.readyState==4)
{
if(request.status==200)
{
var val=request.responseText;
document.getElementById('a').value=val*10;
}
}
}
}
我发现了上述code..in一个ajax教程......我不明白,使用什么是readyState和状态?
request.readyState==4
request.status==200
谁能解释我要使用此代码段的原因的原因吗?
也就是说JavaScript的,而不是Java!它与JSP或Servlet无关。请修复您的标签! – isnot2bad
打开google =>“ajax readystate”=>取得第一个结果! – isnot2bad
好吧我做到了......如果我喜欢那样......我会做的......我更喜欢有人在这里帮助我......那是我来到这里......谷歌..下一次我会做的.. – Vbabey