在使用DHTML进行编程时比较有用,防止浏览器在请求中,死掉
var
xml
=
GenXMLData(tableName, fieldID,
""
,
""
);
var
content
=
"
<
table height=100% width=100%><tr><td><div id='divDoing' style
='position:absolute; left:500px; top:136px; width:196px; height:105px; z-
index:1;'><div align='center'><p><img src='../Images/doing.gif' width
='32' height='32'/></p><p><br/>正在查询、请稍候……</p>
</div></div></td></tr></table>
"
;
contentTD.innerHTML
=
content;
var
XmlHttp
=
new
ActiveXObject(
"
Microsoft.XMLHTTP
"
);
XmlHttp.onreadystatechange
=
function
()
{
if
(XmlHttp.readyState
==
4
)
{
if
(XmlHttp.status
==
200
)
{
contentTD.innerHTML
=
XmlHttp.responseText;
firstPost
=
true
;
}
else
contentTD.innerHTML
=
content ;
}
}
XmlHttp.open(
"
post
"
,webFile,
true
);
XmlHttp.send(xml);
posted on 2008-03-08 22:49
缘来如此 阅读(1070)
评论(0) 编辑 收藏 所属分类:
AJAX