首页 相关文章 AJAX教程(13):通过XMLHTTP把文本文件载入HTML元素

AJAX教程(13):通过XMLHTTP把文本文件载入HTML元素

通过XMLHTTP把文本文件载入HTML元素。

html
head
script type="text/javascript"
var xmlhttp;
function loadXMLDoc(url)
{
xmlhttp=null;
if (window.XMLHttpRequest)
{// code for Firefox, Opera, IE7, etc.
xmlhttp=new XMLHttpRequest();
}
else if (window.ActiveXObject)
{// code for IE6, IE5
xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
}
if (xmlhttp!=null)
{
xmlhttp.onreadystatechange=state_Change;
xmlhttp.open("GET",url,true);
xmlhttp...[ 查看全文 ]

2016-02-20 标签:

AJAX教程(13):通过XMLHTTP把文本文件载入HTML元素的相关文章

手机页面
收藏网站 回到头部