All articles(网络文学目录) All Pictures(图片目录) All Softwares(软件目录)

 
XMLHTTP异步获取返回值的代码超时测试(AJAX)_[AJAX教程]

Writer: 归海一刀 Article type: Programming skills(编程技巧) Time: 2014/3/16 2:53:28 Browse times: 330 Comment times: 0

XMLHTTP异步获取返回值的代码超时测试(AJAX)_[AJAX教程]


Head photo

Go homepage
Upload pictures
Write articles

XMLHTTP异步获取返回值的代码超时测试(AJAX)_[AJAX教程]























客户端文件,请修改文件名为:test_2.htm








xmlhttp异步的例子:
URL:
onclick= "getXML()" type= "button" value= "得到源代码">

onclick= "if(xh && xh.responseText) {alert(xh.responseText);oDiv.innerHTML=xh.responseText} " type= "button" value= "显示源代码 " >
















服务器端文件,请修改文件名为:test_s.asp






<%
dim i
dim r
dim t
dim lngGetI


lngGetI=request.querystring("geti")




on error resume next
lngGetI=clng(lngGetI)
if err<>0 then
response.write "GetError: not isnumber()"
response.end()
end if




if lngGetI<0 or lngGetI>500000 then
lngGetI=10000
end if




response.write "Run Repeat At:" & lngGetI & "
"





t=timer
for i=1 to lngGetI
r = r & i
if i mod 20 = 0 then
r= r & "a
"
end if
next




response.write "run timer:" & cdbl(timer()-t) & "
"
response.write r





%>













































There are 0 records,
Comment:
Must be registered users to comment(必须是注册用户才能发表评论)

Disclaimer Privacy Policy About us Site Map
Copyright ©2011-
uuhomepage.com, Inc. All rights reserved.